Skip to content

Commit

Permalink
feat(a11y): Added parameterization locales and migartion data
Browse files Browse the repository at this point in the history
  • Loading branch information
egordidenko committed Aug 12, 2024
1 parent 8a47cd9 commit 1ab5905
Show file tree
Hide file tree
Showing 37 changed files with 387 additions and 83 deletions.
10 changes: 6 additions & 4 deletions blocks/CloudImageEditor/src/EditorCropButtonControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ function nextValue(operation, prev) {
return null;
}

const L10N_PREFIX = 'a11y-editor-crop-button-control-';

export class EditorCropButtonControl extends EditorButtonControl {
initCallback() {
super.initCallback();
Expand All @@ -30,10 +28,14 @@ export class EditorCropButtonControl extends EditorButtonControl {
/** @private */
this._operation = operation;
this.$['icon'] = operation;
this.$['title-prop'] = `${L10N_PREFIX}${operation}`;
this.bindL10n('title-prop', () =>
this.l10n('a11y-cloud-editor-apply-crop', {
filterName: this.l10n(operation).toLowerCase(),
}),
);
});

this.$['on.click'] = (e) => {
this.$['on.click'] = () => {
let prev = this.$['*cropperEl'].getValue(this._operation);
let next = nextValue(this._operation, prev);
this.$['*cropperEl'].setValue(this._operation, next);
Expand Down
9 changes: 6 additions & 3 deletions blocks/CloudImageEditor/src/EditorFilterControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { FAKE_ORIGINAL_FILTER } from './EditorSlider.js';
import { COMMON_OPERATIONS, transformationsToOperations } from './lib/transformationUtils.js';
import { preloadImage } from './lib/preloadImage.js';

const L10N_PREFIX = 'a11y-editor-filter-control-';

export class EditorFilterControl extends EditorButtonControl {
constructor() {
super();
Expand Down Expand Up @@ -101,7 +99,12 @@ export class EditorFilterControl extends EditorButtonControl {
this._filter = filter;
this.$.isOriginal = filter === FAKE_ORIGINAL_FILTER;
this.$.icon = this.$.isOriginal ? 'original' : 'slider';
this.$['title-prop'] = `${L10N_PREFIX}${filter}`;

this.bindL10n('title-prop', () =>
this.l10n('a11y-cloud-editor-apply-filter', {
filterName: filter.toLowerCase(),
}),
);
},
);

Expand Down
8 changes: 5 additions & 3 deletions blocks/CloudImageEditor/src/EditorOperationControl.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { EditorButtonControl } from './EditorButtonControl.js';
import { COLOR_OPERATIONS_CONFIG } from './toolbar-constants.js';

const L10N_PREFIX = 'a11y-editor-operation-control-';

export class EditorOperationControl extends EditorButtonControl {
/**
* @private
Expand All @@ -23,7 +21,11 @@ export class EditorOperationControl extends EditorButtonControl {
if (operation) {
this._operation = operation;
this.$['icon'] = operation;
this.$['title-prop'] = `${L10N_PREFIX}${operation}`;
this.bindL10n('title-prop', () =>
this.l10n('a11y-cloud-editor-apply-tuning', {
filterName: this.l10n(operation).toLowerCase(),
}),
);
this.bindL10n('title', () => this.l10n(operation));
}
});
Expand Down
13 changes: 11 additions & 2 deletions locales/file-uploader/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ export default {
'images-only-accepted': 'يتم قبول ملفات الصور فقط.',
'file-type-not-allowed': 'رفع هذه أنواع الملفات غير مسموح به.',
'some-files-were-not-uploaded': 'لم يتم رفع بعض الملفات.',
'file-item-edit-button': 'زر التحرير',
'file-item-remove-button': 'زر الإزالة',
'file-item-edit-button': 'تحرير',
'file-item-remove-button': 'إزالة',
'a11y-activity-header-button-close': 'إغلاق',
'a11y-editor-tab-filters': 'فلاتر',
'a11y-editor-tab-tuning': 'ضبط',
'a11y-editor-tab-crop': 'قص',
flip: 'قلب',
mirror: 'مرآة',
'a11y-cloud-editor-apply-filter': 'تطبيق فلتر {{filterName}}',
'a11y-cloud-editor-apply-crop': 'تطبيق عملية {{filterName}}',
'a11y-cloud-editor-apply-tuning': 'تطبيق ضبط {{filterName}}',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/az.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ export default {
'images-only-accepted': 'Yalnız şəkil faylları qəbul edilir.',
'file-type-not-allowed': 'Bu fayl növlərinin yüklənməsinə icazə verilmir.',
'some-files-were-not-uploaded': 'Bəzi fayllar yüklənmədi.',
'file-item-edit-button': 'Düzəliş düyməsi',
'file-item-remove-button': 'Sil düyməsi',
'file-item-edit-button': 'Dəyişdir',
'file-item-remove-button': 'Sil',
'a11y-activity-header-button-close': 'Bağla',
'a11y-editor-tab-filters': 'Filtrlər',
'a11y-editor-tab-tuning': 'Tənzimləmə',
'a11y-editor-tab-crop': 'Kəsmə',
flip: 'Tərsinə çevir',
mirror: 'Ayna',
'a11y-cloud-editor-apply-filter': '{{filterName}} filtrini tətbiq et',
'a11y-cloud-editor-apply-crop': '{{filterName}} əməliyyatını tətbiq et',
'a11y-cloud-editor-apply-tuning': '{{filterName}} tənzimləməsini tətbiq et',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/ca.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ export default {
'images-only-accepted': "Només s'accepten fitxers d'imatge.",
'file-type-not-allowed': "No està permès pujar fitxers d'aquest tipus.",
'some-files-were-not-uploaded': "Alguns fitxers no s'han pujat.",
'file-item-edit-button': "Botó d'edició",
'file-item-remove-button': 'Botó de supressió',
'file-item-edit-button': 'Editar',
'file-item-remove-button': 'Eliminar',
'a11y-activity-header-button-close': 'Tancar',
'a11y-editor-tab-filters': 'Filtres',
'a11y-editor-tab-tuning': 'Ajust',
'a11y-editor-tab-crop': 'Retallar',
flip: 'Capgirar',
mirror: 'Mirall',
'a11y-cloud-editor-apply-filter': 'Aplicar el filtre {{filterName}}',
'a11y-cloud-editor-apply-crop': "Aplicar l'operació {{filterName}}",
'a11y-cloud-editor-apply-tuning': "Aplicar l'ajust {{filterName}}",
};
13 changes: 11 additions & 2 deletions locales/file-uploader/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ export default {
'images-only-accepted': 'Přijímány jsou pouze obrázkové soubory.',
'file-type-not-allowed': 'Nahrávání těchto typů souborů není povoleno.',
'some-files-were-not-uploaded': 'Některé soubory nebyly nahrány.',
'file-item-edit-button': 'Tlačítko upravit',
'file-item-remove-button': 'Tlačítko odstranit',
'file-item-edit-button': 'Upravit',
'file-item-remove-button': 'Odstranit',
'a11y-activity-header-button-close': 'Zavřít',
'a11y-editor-tab-filters': 'Filtry',
'a11y-editor-tab-tuning': 'Ladění',
'a11y-editor-tab-crop': 'Oříznutí',
flip: 'Převrátit',
mirror: 'Zrcadlit',
'a11y-cloud-editor-apply-filter': 'Použít filtr {{filterName}}',
'a11y-cloud-editor-apply-crop': 'Použít operaci {{filterName}}',
'a11y-cloud-editor-apply-tuning': 'Použít ladění {{filterName}}',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/da.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ export default {
'images-only-accepted': 'Kun billedfiler accepteres.',
'file-type-not-allowed': 'Upload af denne filtype er ikke tilladt.',
'some-files-were-not-uploaded': 'Nogle filer blev ikke uploadet.',
'file-item-edit-button': 'Redigeringsknap',
'file-item-remove-button': 'Fjernknap',
'file-item-edit-button': 'Rediger',
'file-item-remove-button': 'Fjern',
'a11y-activity-header-button-close': 'Luk',
'a11y-editor-tab-filters': 'Filtre',
'a11y-editor-tab-tuning': 'Justering',
'a11y-editor-tab-crop': 'Beskær',
flip: 'Vend',
mirror: 'Spejl',
'a11y-cloud-editor-apply-filter': 'Anvend {{filterName}} filter',
'a11y-cloud-editor-apply-crop': 'Anvend {{filterName}} handling',
'a11y-cloud-editor-apply-tuning': 'Anvend {{filterName}} justering',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ export default {
'images-only-accepted': 'Nur Bilddateien werden akzeptiert.',
'file-type-not-allowed': 'Das Hochladen dieser Dateitypen ist nicht erlaubt.',
'some-files-were-not-uploaded': 'Einige Dateien wurden nicht hochgeladen.',
'file-item-edit-button': 'Bearbeiten-Taste',
'file-item-remove-button': 'Entfernen-Taste',
'file-item-edit-button': 'Bearbeiten',
'file-item-remove-button': 'Entfernen',
'a11y-activity-header-button-close': 'Schließen',
'a11y-editor-tab-filters': 'Filter',
'a11y-editor-tab-tuning': 'Feinabstimmung',
'a11y-editor-tab-crop': 'Zuschneiden',
flip: 'Drehen',
mirror: 'Spiegeln',
'a11y-cloud-editor-apply-filter': '{{filterName}}-Filter anwenden',
'a11y-cloud-editor-apply-crop': '{{filterName}}-Operation anwenden',
'a11y-cloud-editor-apply-tuning': '{{filterName}}-Abstimmung anwenden',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/el.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ export default {
'images-only-accepted': 'Επιτρέπονται μόνο αρχεία εικόνων.',
'file-type-not-allowed': 'Η μεταφόρτωση αυτών των τύπων αρχείων δεν επιτρέπεται.',
'some-files-were-not-uploaded': 'Κάποια αρχεία δεν μεταφορτώθηκαν.',
'file-item-edit-button': 'Κουμπί επεξεργασίας',
'file-item-remove-button': 'Κουμπί αφαίρεσης',
'file-item-edit-button': 'Επεξεργασία',
'file-item-remove-button': 'Αφαίρεση',
'a11y-activity-header-button-close': 'Κλείσιμο',
'a11y-editor-tab-filters': 'Φίλτρα',
'a11y-editor-tab-tuning': 'Ρύθμιση',
'a11y-editor-tab-crop': 'Περικοπή',
flip: 'Αναστροφή',
mirror: 'Καθρέφτης',
'a11y-cloud-editor-apply-filter': 'Εφαρμογή φίλτρου {{filterName}}',
'a11y-cloud-editor-apply-crop': 'Εφαρμογή της λειτουργίας {{filterName}}',
'a11y-cloud-editor-apply-tuning': 'Εφαρμογή της ρύθμισης {{filterName}}',
};
14 changes: 7 additions & 7 deletions locales/file-uploader/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,11 @@ export default {
'images-only-accepted': 'Only image files are accepted.',
'file-type-not-allowed': 'Uploading of these file types is not allowed.',
'some-files-were-not-uploaded': 'Some files were not uploaded.',
'file-item-edit-button': 'Edit button',
'file-item-remove-button': 'Remove button',

'file-item-edit-button': 'Edit',
'file-item-remove-button': 'Remove',
'a11y-editor-crop-button-control-rotate': 'Rotate',
'a11y-editor-crop-button-control-mirror': 'Mirror',
'a11y-editor-crop-button-control-flip': 'Flip',

'a11y-editor-operation-control-brightness': 'brightness',
'a11y-editor-operation-control-exposure': 'exposure',
'a11y-editor-operation-control-gamma': 'gamma',
Expand All @@ -115,7 +113,6 @@ export default {
'a11y-editor-operation-control-vibrance': 'vibrance',
'a11y-editor-operation-control-warmth': 'warmth',
'a11y-editor-operation-control-enhance': 'enhance',

'a11y-editor-filter-control-original': 'original',
'a11y-editor-filter-control-adaris': 'adaris',
'a11y-editor-filter-control-briaril': 'briaril',
Expand Down Expand Up @@ -157,10 +154,13 @@ export default {
'a11y-editor-filter-control-yllara': 'yllara',
'a11y-editor-filter-control-zatvel': 'zatvel',
'a11y-editor-filter-control-zevcen': 'zevcen',

'a11y-editor-tab-filters': 'Filters',
'a11y-editor-tab-tuning': 'Tuning',
'a11y-editor-tab-crop': 'Crop',

'a11y-activity-header-button-close': 'Close',
flip: 'Flip',
mirror: 'Mirror',
'a11y-cloud-editor-apply-filter': 'Apply {{filterName}} filter',
'a11y-cloud-editor-apply-crop': 'Apply {{filterName}} operation',
'a11y-cloud-editor-apply-tuning': 'Apply {{filterName}} tuning',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ export default {
'images-only-accepted': 'Solo se aceptan archivos de imagen.',
'file-type-not-allowed': 'No se permite la subida de estos tipos de archivos.',
'some-files-were-not-uploaded': 'Algunos archivos no fueron subidos.',
'file-item-edit-button': 'Botón de edición',
'file-item-remove-button': 'Botón de eliminación',
'file-item-edit-button': 'Editar',
'file-item-remove-button': 'Eliminar',
'a11y-activity-header-button-close': 'Cerrar',
'a11y-editor-tab-filters': 'Filtros',
'a11y-editor-tab-tuning': 'Ajustes',
'a11y-editor-tab-crop': 'Recortar',
flip: 'Voltear',
mirror: 'Espejo',
'a11y-cloud-editor-apply-filter': 'Aplicar filtro {{filterName}}',
'a11y-cloud-editor-apply-crop': 'Aplicar operación {{filterName}}',
'a11y-cloud-editor-apply-tuning': 'Aplicar ajuste {{filterName}}',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/et.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ export default {
'images-only-accepted': 'Aktsepteeritud on ainult pildifailid.',
'file-type-not-allowed': 'Nende failitüüpide üleslaadimine pole lubatud.',
'some-files-were-not-uploaded': 'Mõned failid ei laetud üles.',
'file-item-edit-button': 'Muuda nupp',
'file-item-remove-button': 'Eemalda nupp',
'file-item-edit-button': 'Redigeeri',
'file-item-remove-button': 'Eemalda',
'a11y-activity-header-button-close': 'Sulge',
'a11y-editor-tab-filters': 'Filtrid',
'a11y-editor-tab-tuning': 'Häälestus',
'a11y-editor-tab-crop': 'Kärbi',
flip: 'Pööra',
mirror: 'Peegelda',
'a11y-cloud-editor-apply-filter': 'Rakenda filter {{filterName}}',
'a11y-cloud-editor-apply-crop': 'Rakenda toiming {{filterName}}',
'a11y-cloud-editor-apply-tuning': 'Rakenda häälestus {{filterName}}',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ export default {
'images-only-accepted': 'Seuls les fichiers image sont acceptés.',
'file-type-not-allowed': "Le téléchargement de ces types de fichiers n'est pas autorisé.",
'some-files-were-not-uploaded': "Certains fichiers n'ont pas été téléchargés.",
'file-item-edit-button': "Bouton d'édition",
'file-item-remove-button': 'Bouton de suppression',
'file-item-edit-button': 'Modifier',
'file-item-remove-button': 'Supprimer',
'a11y-activity-header-button-close': 'Fermer',
'a11y-editor-tab-filters': 'Filtres',
'a11y-editor-tab-tuning': 'Réglage',
'a11y-editor-tab-crop': 'Recadrer',
flip: 'Retourner',
mirror: 'Miroir',
'a11y-cloud-editor-apply-filter': 'Appliquer le filtre {{filterName}}',
'a11y-cloud-editor-apply-crop': "Appliquer l'opération {{filterName}}",
'a11y-cloud-editor-apply-tuning': 'Appliquer le réglage {{filterName}}',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/he.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ export default {
'images-only-accepted': 'מתקבלים רק קבצי תמונות.',
'file-type-not-allowed': 'העלאת סוגי קבצים אלו אינה מורשית.',
'some-files-were-not-uploaded': 'חלק מהקבצים לא הועלו.',
'file-item-edit-button': 'כפתור עריכה',
'file-item-remove-button': 'כפתור הסרה',
'file-item-edit-button': 'ערוך',
'file-item-remove-button': 'הסר',
'a11y-activity-header-button-close': 'סגור',
'a11y-editor-tab-filters': 'מסננים',
'a11y-editor-tab-tuning': 'כיוון',
'a11y-editor-tab-crop': 'חיתוך',
flip: 'היפוך',
mirror: 'מראה',
'a11y-cloud-editor-apply-filter': 'החל מסנן {{filterName}}',
'a11y-cloud-editor-apply-crop': 'החל פעולה {{filterName}}',
'a11y-cloud-editor-apply-tuning': 'החל כיוון {{filterName}}',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/hy.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ export default {
'images-only-accepted': 'Միայն պատկերային ֆայլերը ընդունվում են։',
'file-type-not-allowed': 'Այս ֆայլի տեսակների բեռնումը թույլատրված չէ։',
'some-files-were-not-uploaded': 'Որոշ ֆայլեր բեռնված չեն։',
'file-item-edit-button': 'Խմբագրել կոճակը',
'file-item-remove-button': 'Հեռացման կոճակը',
'file-item-edit-button': 'Խմբագրել',
'file-item-remove-button': 'Հեռացնել',
'a11y-activity-header-button-close': 'Փակել',
'a11y-editor-tab-filters': 'Զտիչներ',
'a11y-editor-tab-tuning': 'Կարգավորում',
'a11y-editor-tab-crop': 'Կտրել',
flip: 'Շրջել',
mirror: 'Հայել',
'a11y-cloud-editor-apply-filter': 'Կիրառել {{filterName}} զտիչը',
'a11y-cloud-editor-apply-crop': 'Կիրառել {{filterName}} գործողությունը',
'a11y-cloud-editor-apply-tuning': 'Կիրառել {{filterName}} կարգավորումը',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/is.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ export default {
'images-only-accepted': 'Aðeins myndaskrár eru samþykktar.',
'file-type-not-allowed': 'Ekki er leyft að hlaða upp þessum skráartegundum.',
'some-files-were-not-uploaded': 'Sumar skrár voru ekki hlaðnar upp.',
'file-item-edit-button': 'Breyta hnappur',
'file-item-remove-button': 'Fjarlægja hnappur',
'file-item-edit-button': 'Breyta',
'file-item-remove-button': 'Fjarlægja',
'a11y-activity-header-button-close': 'Loka',
'a11y-editor-tab-filters': 'Síur',
'a11y-editor-tab-tuning': 'Stilling',
'a11y-editor-tab-crop': 'Klippa',
flip: 'Sníða',
mirror: 'Spegill',
'a11y-cloud-editor-apply-filter': 'Nota {{filterName}} sía',
'a11y-cloud-editor-apply-crop': 'Nota {{filterName}} aðgerð',
'a11y-cloud-editor-apply-tuning': 'Nota {{filterName}} stillingu',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ export default {
'images-only-accepted': 'Sono accettati solo file immagine.',
'file-type-not-allowed': 'Il caricamento di questo tipo di file non è permesso.',
'some-files-were-not-uploaded': 'Alcuni file non sono stati caricati.',
'file-item-edit-button': 'Pulsante di modifica',
'file-item-remove-button': 'Pulsante di rimozione',
'file-item-edit-button': 'Modifica',
'file-item-remove-button': 'Rimuovi',
'a11y-activity-header-button-close': 'Chiudi',
'a11y-editor-tab-filters': 'Filtri',
'a11y-editor-tab-tuning': 'Regolazione',
'a11y-editor-tab-crop': 'Ritaglia',
flip: 'Capovolgi',
mirror: 'Specchio',
'a11y-cloud-editor-apply-filter': 'Applica filtro {{filterName}}',
'a11y-cloud-editor-apply-crop': 'Applica operazione {{filterName}}',
'a11y-cloud-editor-apply-tuning': 'Applica regolazione {{filterName}}',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ export default {
'images-only-accepted': '画像ファイルのみ受け付けます。',
'file-type-not-allowed': 'このファイルタイプのアップロードは許可されていません。',
'some-files-were-not-uploaded': '一部のファイルはアップロードされませんでした。',
'file-item-edit-button': '編集ボタン',
'file-item-remove-button': '削除ボタン',
'file-item-edit-button': '編集',
'file-item-remove-button': '削除',
'a11y-activity-header-button-close': '閉じる',
'a11y-editor-tab-filters': 'フィルター',
'a11y-editor-tab-tuning': '調整',
'a11y-editor-tab-crop': '切り抜き',
flip: '反転',
mirror: 'ミラー',
'a11y-cloud-editor-apply-filter': '{{filterName}} フィルターを適用',
'a11y-cloud-editor-apply-crop': '{{filterName}} 操作を適用',
'a11y-cloud-editor-apply-tuning': '{{filterName}} 調整を適用',
};
13 changes: 11 additions & 2 deletions locales/file-uploader/ka.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ export default {
'images-only-accepted': 'მხოლოდ სურათის ფაილები იღება.',
'file-type-not-allowed': 'ამ ფაილის ტიპების ატვირთვა არ არის დასაშვები.',
'some-files-were-not-uploaded': 'ზოგიერთი ფაილი არ ატვირთულა.',
'file-item-edit-button': 'რედაქტირების ღილაკი',
'file-item-remove-button': 'წაშლის ღილაკი',
'file-item-edit-button': 'რედაქტირება',
'file-item-remove-button': 'ამოღება',
'a11y-activity-header-button-close': 'დახურვა',
'a11y-editor-tab-filters': 'ფილტრები',
'a11y-editor-tab-tuning': 'რეგულირება',
'a11y-editor-tab-crop': 'მოჭრა',
flip: 'შებრუნება',
mirror: 'სარკე',
'a11y-cloud-editor-apply-filter': '{{filterName}} ფილტრის გამოყენება',
'a11y-cloud-editor-apply-crop': '{{filterName}} ოპერაციის გამოყენება',
'a11y-cloud-editor-apply-tuning': '{{filterName}} რეგულირების გამოყენება',
};
Loading

0 comments on commit 1ab5905

Please sign in to comment.