Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/hungry-meals-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@rocket.chat/meteor': patch
'@rocket.chat/i18n': patch
---

add some missing translations for sound names and font sizes
48 changes: 35 additions & 13 deletions apps/meteor/client/providers/CustomSoundProvider/lib/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,42 @@ export const getCustomSoundURL = (sound: ICustomSound) => {
return getAssetUrl(`/custom-sounds/${sound._id}.${sound.extension}`, { _dc: sound.random || 0 });
};

// Translation keys for sound names
export const soundTranslationKeys: Record<string, string> = {
'chime': 'Sound_Chime',
'door': 'Sound_Door',
'beep': 'Sound_Beep',
'chelle': 'Sound_Chelle',
'ding': 'Sound_Ding',
'droplet': 'Sound_Droplet',
'highbell': 'Sound_Highbell',
'seasons': 'Sound_Seasons',
'telephone': 'Sound_Telephone',
'outbound-call-ringing': 'Sound_Outbound_Call_Ringing',
'call-ended': 'Sound_Call_Ended',
'dialtone': 'Sound_Dialtone',
'ringtone': 'Sound_Ringtone',
};

export const defaultSounds: ICustomSound[] = [
{ _id: 'chime', name: 'Chime', extension: 'mp3', src: getAssetUrl('sounds/chime.mp3') },
{ _id: 'door', name: 'Door', extension: 'mp3', src: getAssetUrl('sounds/door.mp3') },
{ _id: 'beep', name: 'Beep', extension: 'mp3', src: getAssetUrl('sounds/beep.mp3') },
{ _id: 'chelle', name: 'Chelle', extension: 'mp3', src: getAssetUrl('sounds/chelle.mp3') },
{ _id: 'ding', name: 'Ding', extension: 'mp3', src: getAssetUrl('sounds/ding.mp3') },
{ _id: 'droplet', name: 'Droplet', extension: 'mp3', src: getAssetUrl('sounds/droplet.mp3') },
{ _id: 'highbell', name: 'Highbell', extension: 'mp3', src: getAssetUrl('sounds/highbell.mp3') },
{ _id: 'seasons', name: 'Seasons', extension: 'mp3', src: getAssetUrl('sounds/seasons.mp3') },
{ _id: 'telephone', name: 'Telephone', extension: 'mp3', src: getAssetUrl('sounds/telephone.mp3') },
{ _id: 'outbound-call-ringing', name: 'Outbound Call Ringing', extension: 'mp3', src: getAssetUrl('sounds/outbound-call-ringing.mp3') },
{ _id: 'call-ended', name: 'Call Ended', extension: 'mp3', src: getAssetUrl('sounds/call-ended.mp3') },
{ _id: 'dialtone', name: 'Dialtone', extension: 'mp3', src: getAssetUrl('sounds/dialtone.mp3') },
{ _id: 'ringtone', name: 'Ringtone', extension: 'mp3', src: getAssetUrl('sounds/ringtone.mp3') },
{ _id: 'chime', name: 'Sound_Chime', extension: 'mp3', src: getAssetUrl('sounds/chime.mp3') },
{ _id: 'door', name: 'Sound_Door', extension: 'mp3', src: getAssetUrl('sounds/door.mp3') },
{ _id: 'beep', name: 'Sound_Beep', extension: 'mp3', src: getAssetUrl('sounds/beep.mp3') },
{ _id: 'chelle', name: 'Sound_Chelle', extension: 'mp3', src: getAssetUrl('sounds/chelle.mp3') },
{ _id: 'ding', name: 'Sound_Ding', extension: 'mp3', src: getAssetUrl('sounds/ding.mp3') },
{ _id: 'droplet', name: 'Sound_Droplet', extension: 'mp3', src: getAssetUrl('sounds/droplet.mp3') },
{ _id: 'highbell', name: 'Sound_Highbell', extension: 'mp3', src: getAssetUrl('sounds/highbell.mp3') },
{ _id: 'seasons', name: 'Sound_Seasons', extension: 'mp3', src: getAssetUrl('sounds/seasons.mp3') },
{ _id: 'telephone', name: 'Sound_Telephone', extension: 'mp3', src: getAssetUrl('sounds/telephone.mp3') },
{
_id: 'outbound-call-ringing',
name: 'Sound_Outbound_Call_Ringing',
extension: 'mp3',
src: getAssetUrl('sounds/outbound-call-ringing.mp3'),
},
{ _id: 'call-ended', name: 'Sound_Call_Ended', extension: 'mp3', src: getAssetUrl('sounds/call-ended.mp3') },
{ _id: 'dialtone', name: 'Sound_Dialtone', extension: 'mp3', src: getAssetUrl('sounds/dialtone.mp3') },
{ _id: 'ringtone', name: 'Sound_Ringtone', extension: 'mp3', src: getAssetUrl('sounds/ringtone.mp3') },
];

export const formatVolume = (volume: number) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const AccessibilityPage = () => {
control={control}
name='fontSize'
render={({ field: { onChange, value } }) => (
<Select id={fontSizeId} value={value} onChange={onChange} options={fontSizes} />
<Select id={fontSizeId} value={value} onChange={onChange} options={fontSizes(t)} />
)}
/>
</FieldRow>
Expand Down
15 changes: 9 additions & 6 deletions apps/meteor/client/views/account/accessibility/fontSizes.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import type { SelectOption } from '@rocket.chat/fuselage';
import type { TranslationKey } from '@rocket.chat/ui-contexts';

export const fontSizes: SelectOption[] = [
[`${(14 / 16) * 100}%`, 'Small'],
['100%', 'Default'],
[`${(18 / 16) * 100}%`, 'Medium'],
[`${(20 / 16) * 100}%`, 'Large'],
[`${(24 / 16) * 100}%`, 'Extra large'],
type TranslationFunction = (key: TranslationKey) => string;

export const fontSizes = (t: TranslationFunction): SelectOption[] => [
[`${(14 / 16) * 100}%`, t('Font_Small')],
['100%', t('Font_Default')],
[`${(18 / 16) * 100}%`, t('Font_Medium')],
[`${(20 / 16) * 100}%`, t('Font_Large')],
[`${(24 / 16) * 100}%`, t('Font_Extra_large')],
];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { SelectOption } from '@rocket.chat/fuselage';
import { AccordionItem, Field, FieldGroup, FieldHint, FieldLabel, FieldRow, Select, Slider, ToggleSwitch } from '@rocket.chat/fuselage';
import type { TranslationKey } from '@rocket.chat/ui-contexts';
import { useCustomSound, useTranslation } from '@rocket.chat/ui-contexts';
import { useId } from 'react';
import { Controller, useFormContext } from 'react-hook-form';
Expand All @@ -8,7 +9,7 @@ const PreferencesSoundSection = () => {
const t = useTranslation();

const customSound = useCustomSound();
const soundsList: SelectOption[] = customSound.list?.map((value) => [value._id, value.name]) || [];
const soundsList: SelectOption[] = customSound.list?.map((value) => [value._id, t(value.name as TranslationKey)]) || [];
const { control, watch } = useFormContext();
const { newMessageNotification, notificationsSoundVolume = 100, masterVolume = 100, voipRingerVolume = 100 } = watch();

Expand Down
18 changes: 18 additions & 0 deletions packages/i18n/src/locales/ar.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,11 @@
"Field_removed": "تمت إزالة الحقل",
"Field_required": "حقل مطلوب",
"File": "الملف",
"Font_Default": "افتراضي",
"Font_Extra_large": "كبير جداً",
"Font_Large": "كبير",
"Font_Medium": "متوسط",
"Font_Small": "صغير",
"FileSize_Bytes": "{{fileSize}} بايت",
"FileSize_KB": "{{fileSize}} كيلوبايت",
"FileSize_MB": "{{fileSize}} ميجابايت",
Expand Down Expand Up @@ -3468,7 +3473,20 @@
"Sort_By": "فرز حسب",
"Sort_by_activity": "فرز حسب النشاط",
"Sound": "الصوت",
"Sound_Beep": "صوت تنبيه",
"Sound_Call_Ended": "انتهت المكالمة",
"Sound_Chelle": "شيلي",
"Sound_Chime": "نغمة",
"Sound_Dialtone": "نغمة الطلب",
"Sound_Ding": "دينغ",
"Sound_Door": "باب",
"Sound_Droplet": "قطرة",
"Sound_File_mp3": "ملف الصوت (mp3)",
"Sound_Highbell": "جرس عالي",
"Sound_Outbound_Call_Ringing": "مكالمة صادرة",
"Sound_Ringtone": "نغمة الرنين",
"Sound_Seasons": "مواسم",
"Sound_Telephone": "هاتف",
"Source": "المصدر",
"Star": "تمييز بنجمة",
"Star_Message": "تمييز الرسالة بنجمة",
Expand Down
18 changes: 18 additions & 0 deletions packages/i18n/src/locales/de.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,11 @@
"Field_removed": "Feld entfernt",
"Field_required": "Feld erforderlich",
"File": "Datei",
"Font_Default": "Standard",
"Font_Extra_large": "Sehr groß",
"Font_Large": "Groß",
"Font_Medium": "Mittel",
"Font_Small": "Klein",
"FileSize_Bytes": "{{fileSize}} Bytes",
"FileSize_KB": "{{fileSize}} KB",
"FileSize_MB": "{{fileSize}} MB",
Expand Down Expand Up @@ -3860,8 +3865,21 @@
"Sort_By": "Sortieren nach",
"Sort_by_activity": "Nach Aktivität sortieren",
"Sound": "Ton",
"Sound_Beep": "Piepton",
"Sound_Call_Ended": "Anruf beendet",
"Sound_Chelle": "Chelle",
"Sound_Chime": "Glockenspiel",
"Sound_Dialtone": "Wählton",
"Sound_Ding": "Ding",
"Sound_Door": "Tür",
"Sound_Droplet": "Tropfen",
"Sound File": "Ton-Datei",
"Sound_File_mp3": "Ton-Datei (.mp3)",
"Sound_Highbell": "Hohe Glocke",
"Sound_Outbound_Call_Ringing": "Ausgehender Anruf",
"Sound_Ringtone": "Klingelton",
"Sound_Seasons": "Jahreszeiten",
"Sound_Telephone": "Telefon",
"Source": "Quelle",
"Speakers": "Lautsprecher",
"Star": "Favorisieren",
Expand Down
18 changes: 18 additions & 0 deletions packages/i18n/src/locales/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -2126,6 +2126,11 @@
"Field_removed": "Field removed",
"Field_required": "Field required",
"File": "File",
"Font_Default": "Default",
"Font_Extra_large": "Extra Large",
"Font_Large": "Large",
"Font_Medium": "Medium",
"Font_Small": "Small",
"FileSize_Bytes": "{{fileSize}} Bytes",
"FileSize_KB": "{{fileSize}} KB",
"FileSize_MB": "{{fileSize}} MB",
Expand Down Expand Up @@ -4797,7 +4802,20 @@
"Sorting_mechanism": "Sorting mechanism",
"Sound": "Sound",
"Sound File": "Sound File",
"Sound_Beep": "Beep",
"Sound_Call_Ended": "Call Ended",
"Sound_Chelle": "Chelle",
"Sound_Chime": "Chime",
"Sound_Dialtone": "Dialtone",
"Sound_Ding": "Ding",
"Sound_Door": "Door",
"Sound_Droplet": "Droplet",
"Sound_File_mp3": "Sound File (mp3)",
"Sound_Highbell": "Highbell",
"Sound_Outbound_Call_Ringing": "Outbound Call Ringing",
"Sound_Ringtone": "Ringtone",
"Sound_Seasons": "Seasons",
"Sound_Telephone": "Telephone",
"Sounds": "Sounds",
"Source": "Source",
"Speaker": "Speaker",
Expand Down
18 changes: 18 additions & 0 deletions packages/i18n/src/locales/es.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,11 @@
"Field_removed": "Campo eliminado",
"Field_required": "Campo obligatorio",
"File": "Archivo",
"Font_Default": "Predeterminado",
"Font_Extra_large": "Muy grande",
"Font_Large": "Grande",
"Font_Medium": "Mediano",
"Font_Small": "Pequeño",
"FileSize_Bytes": "{{fileSize}} bytes",
"FileSize_KB": "{{fileSize}} KB",
"FileSize_MB": "{{fileSize}} MB",
Expand Down Expand Up @@ -3558,7 +3563,20 @@
"Sort_By": "Ordenar por",
"Sort_by_activity": "Ordenar por actividad",
"Sound": "Sonido",
"Sound_Beep": "Pitido",
"Sound_Call_Ended": "Llamada terminada",
"Sound_Chelle": "Chelle",
"Sound_Chime": "Campanilla",
"Sound_Dialtone": "Tono de marcar",
"Sound_Ding": "Ding",
"Sound_Door": "Puerta",
"Sound_Droplet": "Gota",
"Sound_File_mp3": "Archivo de sonido (mp3)",
"Sound_Highbell": "Campana alta",
"Sound_Outbound_Call_Ringing": "Llamada saliente",
"Sound_Ringtone": "Tono de llamada",
"Sound_Seasons": "Estaciones",
"Sound_Telephone": "Teléfono",
"Source": "Fuente",
"Star": "Destacar",
"Star_Message": "Destacar mensaje",
Expand Down
18 changes: 18 additions & 0 deletions packages/i18n/src/locales/fi.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,11 @@
"Field_removed": "Kenttä poistettu",
"Field_required": "Kenttä pakollinen",
"File": "Tiedosto",
"Font_Default": "Oletus",
"Font_Extra_large": "Erittäin suuri",
"Font_Large": "Suuri",
"Font_Medium": "Keskikokoinen",
"Font_Small": "Pieni",
"FileSize_Bytes": "{{fileSize}} tavua",
"FileSize_KB": "{{fileSize}} kt",
"FileSize_MB": "{{fileSize}} Mt",
Expand Down Expand Up @@ -3996,8 +4001,21 @@
"Sort_by_activity": "Lajittelu toiminnan mukaan",
"Sorting_mechanism": "Lajittelumekanismi",
"Sound": "Ääni",
"Sound_Beep": "Piippaus",
"Sound_Call_Ended": "Puhelu päättyi",
"Sound_Chelle": "Chelle",
"Sound_Chime": "Kello",
"Sound_Dialtone": "Valintaääni",
"Sound_Ding": "Ding",
"Sound_Door": "Ovi",
"Sound_Droplet": "Pisara",
"Sound File": "Äänitiedosto",
"Sound_File_mp3": "Äänitiedosto (mp3)",
"Sound_Highbell": "Korkea kello",
"Sound_Outbound_Call_Ringing": "Lähtevä puhelu",
"Sound_Ringtone": "Soittoääni",
"Sound_Seasons": "Vuodenajat",
"Sound_Telephone": "Puhelin",
"Source": "Lähde",
"Speakers": "Kaiuttimet",
"Star": "Tähti",
Expand Down
18 changes: 18 additions & 0 deletions packages/i18n/src/locales/fr.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1575,6 +1575,11 @@
"Field_removed": "Champ supprimé",
"Field_required": "Champ requis",
"File": "Fichier",
"Font_Default": "Par défaut",
"Font_Extra_large": "Très grande",
"Font_Large": "Grande",
"Font_Medium": "Moyenne",
"Font_Small": "Petite",
"FileSize_Bytes": "{{fileSize}} octets",
"FileSize_KB": "{{fileSize}} ko",
"FileSize_MB": "{{fileSize}} Mo",
Expand Down Expand Up @@ -3469,7 +3474,20 @@
"Sort_By": "Trier par",
"Sort_by_activity": "Trier par activité",
"Sound": "Son",
"Sound_Beep": "Bip",
"Sound_Call_Ended": "Appel terminé",
"Sound_Chelle": "Chelle",
"Sound_Chime": "Carillon",
"Sound_Dialtone": "Tonalité",
"Sound_Ding": "Ding",
"Sound_Door": "Porte",
"Sound_Droplet": "Goutte",
"Sound_File_mp3": "Fichier audio (mp3)",
"Sound_Highbell": "Cloche haute",
"Sound_Outbound_Call_Ringing": "Appel sortant",
"Sound_Ringtone": "Sonnerie",
"Sound_Seasons": "Saisons",
"Sound_Telephone": "Téléphone",
"Source": "Source",
"Star": "Étoiler",
"Star_Message": "Étoiler le message",
Expand Down
18 changes: 18 additions & 0 deletions packages/i18n/src/locales/hi-IN.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1879,6 +1879,11 @@
"Field_removed": "फ़ील्ड हटा दिया गया",
"Field_required": "आवश्यक क्षेत्र",
"File": "फ़ाइल",
"Font_Default": "डिफ़ॉल्ट",
"Font_Extra_large": "बहुत बड़ा",
"Font_Large": "बड़ा",
"Font_Medium": "मध्यम",
"Font_Small": "छोटा",
"FileSize_Bytes": "{{fileSize}} बाइट्स",
"FileSize_KB": "{{fileSize}} केबी",
"FileSize_MB": "{{fileSize}} एमबी",
Expand Down Expand Up @@ -4267,8 +4272,21 @@
"Sort_by_activity": "गतिविधि के आधार पर क्रमबद्ध करें",
"Sorting_mechanism": "छँटाई तंत्र",
"Sound": "आवाज़",
"Sound_Beep": "बीप",
"Sound_Call_Ended": "कॉल समाप्त",
"Sound_Chelle": "चेले",
"Sound_Chime": "घंटी",
"Sound_Dialtone": "डायल टोन",
"Sound_Ding": "डिंग",
"Sound_Door": "दरवाजा",
"Sound_Droplet": "बूंद",
"Sound File": "ध्वनि फ़ाइल",
"Sound_File_mp3": "ध्वनि फ़ाइल (एमपी3)",
"Sound_Highbell": "ऊंची घंटी",
"Sound_Outbound_Call_Ringing": "आउटबाउंड कॉल रिंगिंग",
"Sound_Ringtone": "रिंगटोन",
"Sound_Seasons": "सीज़न",
"Sound_Telephone": "टेलीफोन",
"Sounds": "ध्वनि",
"Source": "स्रोत",
"Speakers": "वक्ताओं",
Expand Down
18 changes: 18 additions & 0 deletions packages/i18n/src/locales/hu.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,11 @@
"Field_removed": "Mező eltávolítva",
"Field_required": "Kötelező mező",
"File": "Fájl",
"Font_Default": "Alapértelmezett",
"Font_Extra_large": "Nagyon nagy",
"Font_Large": "Nagy",
"Font_Medium": "Közepes",
"Font_Small": "Kicsi",
"FileSize_Bytes": "{{fileSize}} bájt",
"FileSize_KB": "{{fileSize}} KB",
"FileSize_MB": "{{fileSize}} MB",
Expand Down Expand Up @@ -3761,8 +3766,21 @@
"Sort_By": "Rendezési sorrend",
"Sort_by_activity": "Rendezés tevékenység szerint",
"Sound": "Hang",
"Sound_Beep": "Síp",
"Sound_Call_Ended": "Hívás befejeződött",
"Sound_Chelle": "Chelle",
"Sound_Chime": "Csengő",
"Sound_Dialtone": "Tárcsahang",
"Sound_Ding": "Ding",
"Sound_Door": "Ajtó",
"Sound_Droplet": "Csepp",
"Sound File": "Hangfájl",
"Sound_File_mp3": "Hangfájl (mp3)",
"Sound_Highbell": "Magas csengő",
"Sound_Outbound_Call_Ringing": "Kimenő hívás csörgése",
"Sound_Ringtone": "Csengőhang",
"Sound_Seasons": "Évszakok",
"Sound_Telephone": "Telefon",
"Source": "Forrás",
"Speakers": "Hangszórók",
"Star": "Csillagozás",
Expand Down
Loading
Loading