147 lines
12 KiB
JavaScript
147 lines
12 KiB
JavaScript
export const language_list = [{'language': 'Afrikaans', 'country': 'South Africa'}, {'language': 'Albanian', 'country': 'Albania'}, {'language': 'Amharic', 'country': 'Ethiopia'}, {'language': 'Arabic', 'country': 'Algeria'}, {'language': 'Arabic', 'country': 'Bahrain'}, {'language': 'Arabic', 'country': 'Egypt'}, {'language': 'Arabic', 'country': 'Israel'}, {'language': 'Arabic', 'country': 'Iraq'}, {'language': 'Arabic', 'country': 'Jordan'}, {'language': 'Arabic', 'country': 'Kuwait'}, {'language': 'Arabic', 'country': 'Lebanon'}, {'language': 'Arabic', 'country': 'Mauritania'}, {'language': 'Arabic', 'country': 'Morocco'}, {'language': 'Arabic', 'country': 'Oman'}, {'language': 'Arabic', 'country': 'Qatar'}, {'language': 'Arabic', 'country': 'Saudi Arabia'}, {'language': 'Arabic', 'country': 'Palestine'}, {'language': 'Arabic', 'country': 'Syria'}, {'language': 'Arabic', 'country': 'Tunisia'}, {'language': 'Arabic', 'country': 'United Arab Emirates'}, {'language': 'Arabic', 'country': 'Yemen'}, {'language': 'Armenian', 'country': 'Armenia'}, {'language': 'Azerbaijani', 'country': 'Azerbaijan'}, {'language': 'Basque', 'country': 'Spain'}, {'language': 'Bengali', 'country': 'Bangladesh'}, {'language': 'Bengali', 'country': 'India'}, {'language': 'Bosnian', 'country': 'Bosnia and Herzegovina'}, {'language': 'Bulgarian', 'country': 'Bulgaria'}, {'language': 'Catalan', 'country': 'Spain'}, {'language': 'Chinese Simplified', 'country': 'China'}, {'language': 'Chinese Simplified', 'country': 'Hong Kong'}, {'language': 'Chinese Traditional', 'country': 'Taiwan'}, {'language': 'Chinese Traditional', 'country': 'Hong Kong'}, {'language': 'Croatian', 'country': 'Croatia'}, {'language': 'Czech', 'country': 'Czech Republic'}, {'language': 'Danish', 'country': 'Denmark'}, {'language': 'Dutch', 'country': 'Belgium'}, {'language': 'Dutch', 'country': 'Netherlands'}, {'language': 'English', 'country': 'Australia'}, {'language': 'English', 'country': 'Canada'}, {'language': 'English', 'country': 'Ghana'}, {'language': 'English', 'country': 'Hong Kong'}, {'language': 'English', 'country': 'India'}, {'language': 'English', 'country': 'Ireland'}, {'language': 'English', 'country': 'Kenya'}, {'language': 'English', 'country': 'New Zealand'}, {'language': 'English', 'country': 'Nigeria'}, {'language': 'English', 'country': 'Philippines'}, {'language': 'English', 'country': 'Singapore'}, {'language': 'English', 'country': 'South Africa'}, {'language': 'English', 'country': 'Tanzania'}, {'language': 'English', 'country': 'United Kingdom'}, {'language': 'English', 'country': 'United States'}, {'language': 'Estonian', 'country': 'Estonia'}, {'language': 'Filipino', 'country': 'Philippines'}, {'language': 'Finnish', 'country': 'Finland'}, {'language': 'French', 'country': 'Belgium'}, {'language': 'French', 'country': 'Canada'}, {'language': 'French', 'country': 'France'}, {'language': 'French', 'country': 'Switzerland'}, {'language': 'Galician', 'country': 'Spain'}, {'language': 'Georgian', 'country': 'Georgia'}, {'language': 'German', 'country': 'Austria'}, {'language': 'German', 'country': 'Germany'}, {'language': 'German', 'country': 'Switzerland'}, {'language': 'Greek', 'country': 'Greece'}, {'language': 'Gujarati', 'country': 'India'}, {'language': 'Hebrew', 'country': 'Israel'}, {'language': 'Hindi', 'country': 'India'}, {'language': 'Hungarian', 'country': 'Hungary'}, {'language': 'Icelandic', 'country': 'Iceland'}, {'language': 'Indonesian', 'country': 'Indonesia'}, {'language': 'Italian', 'country': 'Italy'}, {'language': 'Italian', 'country': 'Switzerland'}, {'language': 'Japanese', 'country': 'Japan'}, {'language': 'Kannada', 'country': 'India'}, {'language': 'Kazakh', 'country': 'Kazakhstan'}, {'language': 'Khmer', 'country': 'Cambodia'}, {'language': 'Korean', 'country': 'South Korea'}, {'language': 'Lao', 'country': 'Laos'}, {'language': 'Latvian', 'country': 'Latvia'}, {'language': 'Lithuanian', 'country': 'Lithuania'}, {'language': 'Macedonian', 'country': 'North Macedonia'}, {'language': 'Malay', 'country': 'Malaysia'}, {'language': 'Malayalam', 'country': 'India'}, {'language': 'Mongolian', 'country': 'Mongolia'}, {'language': 'Nepali', 'country': 'Nepal'}, {'language': 'Norwegian', 'country': 'Norway'}, {'language': 'Persian', 'country': 'Iran'}, {'language': 'Polish', 'country': 'Poland'}, {'language': 'Portuguese', 'country': 'Brazil'}, {'language': 'Portuguese', 'country': 'Portugal'}, {'language': 'Romanian', 'country': 'Romania'}, {'language': 'Russian', 'country': 'Russia'}, {'language': 'Serbian', 'country': 'Serbia'}, {'language': 'Sinhala', 'country': 'Sri Lanka'}, {'language': 'Slovak', 'country': 'Slovakia'}, {'language': 'Slovenian', 'country': 'Slovenia'}, {'language': 'Spanish', 'country': 'Argentina'}, {'language': 'Spanish', 'country': 'Bolivia'}, {'language': 'Spanish', 'country': 'Chile'}, {'language': 'Spanish', 'country': 'Colombia'}, {'language': 'Spanish', 'country': 'Costa Rica'}, {'language': 'Spanish', 'country': 'Dominican Republic'}, {'language': 'Spanish', 'country': 'Ecuador'}, {'language': 'Spanish', 'country': 'El Salvador'}, {'language': 'Spanish', 'country': 'Guatemala'}, {'language': 'Spanish', 'country': 'Honduras'}, {'language': 'Spanish', 'country': 'Mexico'}, {'language': 'Spanish', 'country': 'Nicaragua'}, {'language': 'Spanish', 'country': 'Panama'}, {'language': 'Spanish', 'country': 'Paraguay'}, {'language': 'Spanish', 'country': 'Peru'}, {'language': 'Spanish', 'country': 'Puerto Rico'}, {'language': 'Spanish', 'country': 'Spain'}, {'language': 'Spanish', 'country': 'United States'}, {'language': 'Spanish', 'country': 'Uruguay'}, {'language': 'Spanish', 'country': 'Venezuela'}, {'language': 'Sundanese', 'country': 'Indonesia'}, {'language': 'Swahili', 'country': 'Kenya'}, {'language': 'Swahili', 'country': 'Tanzania'}, {'language': 'Swedish', 'country': 'Sweden'}, {'language': 'Tamil', 'country': 'India'}, {'language': 'Tamil', 'country': 'malaysia'}, {'language': 'Tamil', 'country': 'Singapore'}, {'language': 'Tamil', 'country': 'Sri Lanka'}, {'language': 'Telugu', 'country': 'India'}, {'language': 'Thai', 'country': 'Thailand'}, {'language': 'Turkish', 'country': 'Turkey'}, {'language': 'Ukrainian', 'country': 'Ukraine'}, {'language': 'Urdu', 'country': 'India'}, {'language': 'Urdu', 'country': 'Pakistan'}, {'language': 'Uzbek', 'country': 'Uzbekistan'}, {'language': 'Vietnamese', 'country': 'Vietnam'}];
|
|
|
|
export const translator_list = [
|
|
{ translator_key: "DeepL", translator_name: "DeepL", is_available: true },
|
|
{ translator_key: "DeepL_API", translator_name: `DeepL\nAPI`, is_available: false },
|
|
{ translator_key: "Google", translator_name: "Google", is_available: true },
|
|
{ translator_key: "Bing", translator_name: "Bing", is_available: true },
|
|
{ translator_key: "Papago", translator_name: "Papago", is_available: true },
|
|
{ translator_key: "CTranslate2", translator_name: `Internal\n(Default)`, is_available: true },
|
|
];
|
|
|
|
export const test_device_list = {
|
|
a: "Device A",
|
|
"device b": "Device B",
|
|
};
|
|
|
|
|
|
export const generateTestData = (num) => {
|
|
const testDataArray = [];
|
|
const messagesJa = [
|
|
"今日はとてもいい天気ですね。",
|
|
"次の会議は何時に始まりますか?",
|
|
"新しいプロジェクトについて話しましょう。",
|
|
"お疲れ様です。今日は早く帰れますか?",
|
|
"この書類にサインをお願いします。",
|
|
"次の休暇はどこに行きますか?",
|
|
"先週のレポートを見ましたか?",
|
|
"この問題をどうやって解決しますか?",
|
|
"週末は何をする予定ですか?",
|
|
"新しいアイデアを聞かせてください。",
|
|
"こんにちは、調子はどうですか?",
|
|
"おはようございます、今日の予定は何ですか?",
|
|
"こんばんは、今日は楽しかったですか?",
|
|
"ありがとう、助かりました。",
|
|
"さようなら、また会いましょう。",
|
|
"はい、分かりました。",
|
|
"いいえ、ちょっと難しいです。",
|
|
"すみません、もう一度言ってください。",
|
|
"お願いします、手伝ってください。",
|
|
"お疲れ様です、今日も頑張りましょう。",
|
|
];
|
|
const messagesEn = [
|
|
"The weather is very nice today.",
|
|
"What time does the next meeting start?",
|
|
"Let's talk about the new project.",
|
|
"Good job today. Can you leave early today?",
|
|
"Please sign this document.",
|
|
"Where are you going for the next vacation?",
|
|
"Did you see last week's report?",
|
|
"How do we solve this problem?",
|
|
"What are your plans for the weekend?",
|
|
"Tell me about your new idea.",
|
|
"Hello, how are you?",
|
|
"Good morning, what are your plans for today?",
|
|
"Good evening, did you have a good day?",
|
|
"Thank you, that was helpful.",
|
|
"Goodbye, see you again.",
|
|
"Yes, understood.",
|
|
"No, it's a bit difficult.",
|
|
"Sorry, could you say that again?",
|
|
"Please, help me out.",
|
|
"Good job today, let's do our best again tomorrow.",
|
|
];
|
|
const statuses = ["sent", "received"];
|
|
|
|
for (let i = 0; i < num; i++) {
|
|
const uuid = crypto.randomUUID();
|
|
const date = new Date().toLocaleTimeString(
|
|
"ja-JP",
|
|
{ hour12: false, hour: "2-digit", minute: "2-digit" }
|
|
);
|
|
const messageIndex = Math.floor(Math.random() * messagesJa.length);
|
|
const status = statuses[Math.floor(Math.random() * statuses.length)];
|
|
|
|
const testData = {
|
|
id: uuid,
|
|
category: status,
|
|
status: status,
|
|
created_at: date,
|
|
messages: {
|
|
original: messagesJa[messageIndex],
|
|
translated: [
|
|
messagesEn[messageIndex],
|
|
],
|
|
},
|
|
};
|
|
testDataArray.push(testData);
|
|
}
|
|
|
|
return testDataArray;
|
|
};
|
|
|
|
export const word_filter_list = [
|
|
{ value: "りんご", is_redoable: false },
|
|
{ value: "forest", is_redoable: false },
|
|
{ value: "もり", is_redoable: false },
|
|
{ value: "elephant", is_redoable: false },
|
|
{ value: "penguin", is_redoable: false },
|
|
{ value: "やま", is_redoable: false },
|
|
{ value: "notebook", is_redoable: false },
|
|
{ value: "zebra", is_redoable: false },
|
|
{ value: "ちょう", is_redoable: false },
|
|
{ value: "dinosaur", is_redoable: false },
|
|
{ value: "たいこ", is_redoable: false },
|
|
{ value: "カンガルー", is_redoable: false },
|
|
{ value: "ふうせん", is_redoable: false },
|
|
{ value: "candle", is_redoable: false },
|
|
{ value: "tiger", is_redoable: false },
|
|
{ value: "umbrella", is_redoable: false },
|
|
{ value: "garden", is_redoable: false },
|
|
{ value: "ペンギン", is_redoable: false },
|
|
{ value: "ひまわり", is_redoable: false },
|
|
{ value: "kangaroo", is_redoable: false },
|
|
{ value: "とうだい", is_redoable: false },
|
|
{ value: "シロフォン", is_redoable: false },
|
|
{ value: "ひこうき", is_redoable: false },
|
|
{ value: "しろ", is_redoable: false },
|
|
{ value: "しあわせ", is_redoable: false },
|
|
{ value: "xylophone", is_redoable: false },
|
|
{ value: "volcano", is_redoable: false },
|
|
{ value: "drum", is_redoable: false },
|
|
{ value: "lighthouse", is_redoable: false },
|
|
{ value: "quicksand", is_redoable: false },
|
|
{ value: "airplane", is_redoable: false },
|
|
{ value: "しまうま", is_redoable: false },
|
|
{ value: "sunflower", is_redoable: false },
|
|
{ value: "ジャングル", is_redoable: false },
|
|
{ value: "くじら", is_redoable: false },
|
|
{ value: "apple", is_redoable: false },
|
|
{ value: "island", is_redoable: false },
|
|
{ value: "ocean", is_redoable: false },
|
|
{ value: "rainbow", is_redoable: false },
|
|
{ value: "castle", is_redoable: false },
|
|
{ value: "かさ", is_redoable: false },
|
|
{ value: "ぞう", is_redoable: false },
|
|
{ value: "balloon", is_redoable: false },
|
|
{ value: "happiness", is_redoable: false },
|
|
{ value: "whale", is_redoable: false },
|
|
{ value: "にじ", is_redoable: false },
|
|
{ value: "ヨット", is_redoable: false },
|
|
{ value: "しま", is_redoable: false },
|
|
{ value: "かざん", is_redoable: false },
|
|
{ value: "ノート", is_redoable: false },
|
|
{ value: "mountain", is_redoable: false },
|
|
{ value: "うみ", is_redoable: false },
|
|
{ value: "ジャングル", is_redoable: false },
|
|
]; |