Skip to content

Commit 69efaff

Browse files
authored
fix: missing locale keys for created_at_timestamp and updated_at_timestamp (#3721)
* fix: missing locale keys for `created_at_timestamp` and `updated_at_timestamp` * variable name fix * variable name fix * i18n-tasks check-consistent-interpolations
1 parent 4898fc5 commit 69efaff

19 files changed

+65
-0
lines changed

Diff for: CONTRIBUTING.MD

+29
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,32 @@ To keep track of the schema structure for the models, run `annotate --models --e
224224
## Using VSCode?
225225

226226
We compiled [an extension pack](https://marketplace.visualstudio.com/items?itemName=adrianthedev.vsruby) with a few extensions that should help you with Ruby development. We use them with Avo.
227+
228+
## Adding I18n Keys
229+
230+
When incorporating I18n keys, such as `avo.preview`, it's important to ensure that all locale files include the key with appropriate translations.
231+
232+
### Step 1: Add and Normalize
233+
First, add the key to the `avo.en.yml` file. Then, run the following command to normalize the locale files alphabetically:
234+
```bash
235+
i18n-tasks normalize
236+
```
237+
238+
### Step 2: Adding Missing Keys with or without Translation
239+
240+
When adding missing keys, you have two options: proceed without translation or automatically translate them using OpenAI.
241+
242+
#### Option 1: Add Missing Keys Without Translation
243+
Run the following command to add the missing keys to all locale files:
244+
```bash
245+
i18n-tasks add-missing
246+
```
247+
This will populate the missing keys but retain the original label without translations applied.
248+
249+
#### Option 2: Add and Automatically Translate Missing Keys
250+
If you prefer to automatically translate the missing keys, skip the previous step and execute this command with your OpenAI API token:
251+
```bash
252+
OPENAI_API_KEY=TOKEN bundle exec i18n-tasks translate-missing --backend=openai
253+
```
254+
255+
Replace `TOKEN` with your actual OpenAI API key. This step will both add the missing keys and translate them automatically.

Diff for: lib/generators/avo/templates/locales/avo.ar.yml

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ ar:
3333
confirm: تأكيد
3434
copy: نسخ
3535
create_new_item: إنشاء %{item} جديد
36+
created_at_timestamp: تم الإنشاء في %{created_at}
3637
dashboard: لوحة القيادة
3738
dashboards: لوحات القيادة
3839
default_scope: الجميع
@@ -126,6 +127,7 @@ ar:
126127
type_to_search: اكتب للبحث.
127128
unauthorized: غير مصرح به
128129
undo: تراجع
130+
updated_at_timestamp: تم التحديث في %{updated_at}
129131
view: عرض
130132
view_item: عرض %{item}
131133
visit_record_on_external_path: زيارة السجل على الرابط الخارجي

Diff for: lib/generators/avo/templates/locales/avo.de.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ de:
2727
confirm: Bestätigen
2828
copy: Kopieren
2929
create_new_item: Neues %{item} erstellen
30+
created_at_timestamp: Erstellt am %{created_at}
3031
dashboard: Dashboard
3132
dashboards: Dashboards
3233
default_scope: Alle
@@ -116,6 +117,7 @@ de:
116117
type_to_search: Tippen, um zu suchen.
117118
unauthorized: Nicht autorisiert
118119
undo: Rückgängig machen
120+
updated_at_timestamp: Aktualisiert am %{updated_at}
119121
view: Anzeigen
120122
view_item: "%{item} anzeigen"
121123
visit_record_on_external_path: Datensatz über externen Link besuchen

Diff for: lib/generators/avo/templates/locales/avo.en.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ en:
2727
confirm: Confirm
2828
copy: Copy
2929
create_new_item: Create new %{item}
30+
created_at_timestamp: Created at %{created_at}
3031
dashboard: Dashboard
3132
dashboards: Dashboards
3233
default_scope: All
@@ -116,6 +117,7 @@ en:
116117
type_to_search: Type to search.
117118
unauthorized: Unauthorized
118119
undo: undo
120+
updated_at_timestamp: Updated at %{updated_at}
119121
view: View
120122
view_item: view %{item}
121123
visit_record_on_external_path: Visit record on external path

Diff for: lib/generators/avo/templates/locales/avo.es.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ es:
2929
confirm: Confirmar
3030
copy: Copiar
3131
create_new_item: Crear nuevo/a %{item}
32+
created_at_timestamp: Creado en %{created_at}
3233
dashboard: Panel
3334
dashboards: Paneles
3435
default_scope: Todos
@@ -118,6 +119,7 @@ es:
118119
type_to_search: Escribe para buscar.
119120
unauthorized: No autorizado
120121
undo: deshacer
122+
updated_at_timestamp: Actualizado en %{updated_at}
121123
view: Vista
122124
view_item: ver %{item}
123125
visit_record_on_external_path: Visitar registro en enlace externo

Diff for: lib/generators/avo/templates/locales/avo.fr.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ fr:
2929
confirm: Confirmer
3030
copy: Copier
3131
create_new_item: Créer un nouveau %{item}
32+
created_at_timestamp: Créé le %{created_at}
3233
dashboard: Tableau de bord
3334
dashboards: Tableaux de bord
3435
default_scope: Tout
@@ -118,6 +119,7 @@ fr:
118119
type_to_search: Type à rechercher.
119120
unauthorized: Non autorisé
120121
undo: annuler
122+
updated_at_timestamp: Mis à jour le %{updated_at}
121123
view: Vue
122124
view_item: voir %{item}
123125
visit_record_on_external_path: Consulter l'enregistrement via un lien externe

Diff for: lib/generators/avo/templates/locales/avo.it.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ it:
2727
confirm: Conferma
2828
copy: Copia
2929
create_new_item: Crea nuovo %{item}
30+
created_at_timestamp: Creato il %{created_at}
3031
dashboard: Cruscotto
3132
dashboards: Cruscotti
3233
default_scope: Tutti
@@ -116,6 +117,7 @@ it:
116117
type_to_search: Digita per cercare.
117118
unauthorized: Non autorizzato
118119
undo: Annulla
120+
updated_at_timestamp: Aggiornato il %{updated_at}
119121
view: Visualizza
120122
view_item: Visualizza %{item}
121123
visit_record_on_external_path: Visita il record tramite link esterno

Diff for: lib/generators/avo/templates/locales/avo.ja.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ ja:
2929
confirm: 確認
3030
copy: コピー
3131
create_new_item: 新しい%{item}を作成
32+
created_at_timestamp: "%{created_at}で作成"
3233
dashboard: ダッシュボード
3334
dashboards: ダッシュボード
3435
default_scope: 全て
@@ -118,6 +119,7 @@ ja:
118119
type_to_search: 検索する内容を入力してください。
119120
unauthorized: 許可されていません
120121
undo: 元に戻す
122+
updated_at_timestamp: "%{updated_at}で更新"
121123
view: ビュー
122124
view_item: "%{item}を表示"
123125
visit_record_on_external_path: 外部リンクで記録を確認する

Diff for: lib/generators/avo/templates/locales/avo.nb.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ nb:
2929
confirm: Bekreft
3030
copy: Kopier
3131
create_new_item: Lag ny %{item}
32+
created_at_timestamp: Opprettet den %{created_at}
3233
dashboard: Dashboard
3334
dashboards: Dashboards
3435
default_scope: Alle
@@ -118,6 +119,7 @@ nb:
118119
type_to_search: Søk.
119120
unauthorized: Ikke autorisert
120121
undo: angre
122+
updated_at_timestamp: Oppdatert den %{updated_at}
121123
view: Vis
122124
view_item: vis %{item}
123125
visit_record_on_external_path: Besøk posten via en ekstern lenke

Diff for: lib/generators/avo/templates/locales/avo.nl.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ nl:
2727
confirm: Bevestigen
2828
copy: Kopie
2929
create_new_item: Nieuw %{item} aanmaken
30+
created_at_timestamp: Aangemaakt op %{created_at}
3031
dashboard: Dashboard
3132
dashboards: Dashboards
3233
default_scope: Alle
@@ -116,6 +117,7 @@ nl:
116117
type_to_search: Typ om te zoeken.
117118
unauthorized: Niet geautoriseerd
118119
undo: Ongedaan maken
120+
updated_at_timestamp: Bijgewerkt op %{updated_at}
119121
view: Bekijken
120122
view_item: "%{item} bekijken"
121123
visit_record_on_external_path: Bezoek record via een externe link

Diff for: lib/generators/avo/templates/locales/avo.nn.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ nn:
2929
confirm: Stadfest
3030
copy: Kopier
3131
create_new_item: Lag ny %{item}
32+
created_at_timestamp: Oppretta den %{created_at}
3233
dashboard: Dashboard
3334
dashboards: Dashboards
3435
default_scope: Alle
@@ -118,6 +119,7 @@ nn:
118119
type_to_search: Søk.
119120
unauthorized: Ikkje autorisert
120121
undo: angre
122+
updated_at_timestamp: Oppdatert den %{updated_at}
121123
view: Vis
122124
view_item: vis %{item}
123125
visit_record_on_external_path: Besøk posten via ein ekstern lenke

Diff for: lib/generators/avo/templates/locales/avo.pl.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pl:
2727
confirm: Potwierdź
2828
copy: Kopiuj
2929
create_new_item: Utwórz nowy %{item}
30+
created_at_timestamp: Utworzono o %{created_at}
3031
dashboard: Pulpit nawigacyjny
3132
dashboards: Pulpity nawigacyjne
3233
default_scope: Wszystkie
@@ -118,6 +119,7 @@ pl:
118119
type_to_search: Wpisz, aby wyszukać.
119120
unauthorized: Brak autoryzacji
120121
undo: Cofnij
122+
updated_at_timestamp: Zaktualizowano o %{updated_at}
121123
view: Widok
122124
view_item: Wyświetl %{item}
123125
visit_record_on_external_path: Odwiedź rekord za pomocą zewnętrznego linku

Diff for: lib/generators/avo/templates/locales/avo.pt-BR.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pt-BR:
2929
confirm: Confirmar
3030
copy: Copiar
3131
create_new_item: Criar novo %{item}
32+
created_at_timestamp: Criado em %{created_at}
3233
dashboard: Painel
3334
dashboards: Painéis
3435
default_scope: Todos
@@ -118,6 +119,7 @@ pt-BR:
118119
type_to_search: Digite para buscar.
119120
unauthorized: Não autorizado
120121
undo: desfazer
122+
updated_at_timestamp: Atualizado em %{updated_at}
121123
view: Visualizar
122124
view_item: visualizar %{item}
123125
visit_record_on_external_path: Visitar registro através de link externo

Diff for: lib/generators/avo/templates/locales/avo.pt.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pt:
2929
confirm: Confirmar
3030
copy: Copiar
3131
create_new_item: Criar novo %{item}
32+
created_at_timestamp: Criado em %{created_at}
3233
dashboard: Painel
3334
dashboards: Painéis
3435
default_scope: Todos
@@ -118,6 +119,7 @@ pt:
118119
type_to_search: Escreva para pesquisar.
119120
unauthorized: Não autorizado
120121
undo: desfazer
122+
updated_at_timestamp: Atualizado em %{updated_at}
121123
view: Ver
122124
view_item: ver %{item}
123125
visit_record_on_external_path: Visitar registro através de link externo

Diff for: lib/generators/avo/templates/locales/avo.ro.yml

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ ro:
3030
confirm: Confirm
3131
copy: Copiază
3232
create_new_item: Creează %{item}
33+
created_at_timestamp: Creat la %{created_at}
3334
dashboard: Panou de control
3435
dashboards: Panouri de control
3536
default_scope: Tot
@@ -120,6 +121,7 @@ ro:
120121
type_to_search: Caută aici...
121122
unauthorized: Neautorizat
122123
undo: Anulează
124+
updated_at_timestamp: Actualizat la %{updated_at}
123125
view: vezi
124126
view_item: vezi %{item}
125127
visit_record_on_external_path: Vizitați înregistrarea printr-un link extern

Diff for: lib/generators/avo/templates/locales/avo.ru.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ ru:
2727
confirm: Подтвердить
2828
copy: Копировать
2929
create_new_item: Создать новый %{item}
30+
created_at_timestamp: Создано в %{created_at}
3031
dashboard: Панель управления
3132
dashboards: Панели управления
3233
default_scope: Все
@@ -118,6 +119,7 @@ ru:
118119
type_to_search: Поиск...
119120
unauthorized: Не авторизован
120121
undo: Отменить
122+
updated_at_timestamp: Обновлено в %{updated_at}
121123
view: Просмотр
122124
view_item: Просмотр %{item}
123125
visit_record_on_external_path: Перейти к записи через внешнюю ссылку

Diff for: lib/generators/avo/templates/locales/avo.tr.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ tr:
2929
confirm: Onayla
3030
copy: Kopya
3131
create_new_item: Yeni bir %{item} oluşturun
32+
created_at_timestamp: "%{created_at} tarihinde oluşturuldu"
3233
dashboard: Yönetim Paneli
3334
dashboards: Yönetim Panelleri
3435
default_scope: Herşey
@@ -118,6 +119,7 @@ tr:
118119
type_to_search: Aramak için yazın.
119120
unauthorized: Yetkisiz
120121
undo: geri al
122+
updated_at_timestamp: "%{updated_at} tarihinde güncellendi"
121123
view: Görünüm
122124
view_item: "%{item} öğresini görüntüle"
123125
visit_record_on_external_path: Harici bağlantı yoluyla kaydı ziyaret et

Diff for: lib/generators/avo/templates/locales/avo.uk.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ uk:
2727
confirm: Підтвердити
2828
copy: Копіювати
2929
create_new_item: Створити новий %{item}
30+
created_at_timestamp: Sukurta %{created_at}
3031
dashboard: Панель керування
3132
dashboards: Панелі керування
3233
default_scope: Всі
@@ -118,6 +119,7 @@ uk:
118119
type_to_search: Введіть для пошуку.
119120
unauthorized: Не авторизовано
120121
undo: Скасувати
122+
updated_at_timestamp: Atnaujinta %{updated_at}
121123
view: Перегляд
122124
view_item: Перегляд %{item}
123125
visit_record_on_external_path: Перейти до запису через зовнішнє посилання

Diff for: lib/generators/avo/templates/locales/avo.zh.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ zh:
2727
confirm: 确认
2828
copy: 复制
2929
create_new_item: 创建新的 %{item}
30+
created_at_timestamp: 创建于%{created_at}
3031
dashboard: 仪表盘
3132
dashboards: 仪表盘
3233
default_scope: 所有
@@ -116,6 +117,7 @@ zh:
116117
type_to_search: 输入以搜索。
117118
unauthorized: 未经授权
118119
undo: 撤销
120+
updated_at_timestamp: 更新于%{updated_at}
119121
view: 查看
120122
view_item: 查看 %{item}
121123
visit_record_on_external_path: 通过外部链接访问记录

0 commit comments

Comments
 (0)