Skip to content

Commit

Permalink
fix: fix i18n plural forms (monicahq/chandler#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored May 6, 2023
1 parent 543ba8f commit 721abb9
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 51 deletions.
15 changes: 7 additions & 8 deletions lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"+ prefix": "+ Präfix",
"+ pronoun": "+ Pronomen",
"+ suffix": "+ Suffix",
":count contact|:count contacts": ":count Kontakte",
":count hours slept": ":count Stunden geschlafen",
":count contact|:count contacts": ":count Kontakt|:count Kontakte",
":count hour slept|:count hours slept": ":count Stunde geschlafen|:count Stunden geschlafen",
":count min read": ":count Min. Lesezeit",
":count post|:count posts": ":count Beiträge",
":count template section|:count template sections": ":count Vorlagenabschnitte",
":count word|:count words": ":count Wörter",
":count post|:count posts": ":count Beitrag|:count Beiträge",
":count template section|:count template sections": ":count Vorlagenabschnitt|:count Vorlagenabschnitte",
":count word|:count words": ":count Wort|:count Wörter",
":distance km": ":distance km",
":distance miles": ":distance Meilen",
":name called": ":name hat angerufen",
Expand Down Expand Up @@ -739,7 +739,7 @@
"Rabbit": "Kaninchen",
"Ran": "Gelaufen",
"Rat": "Ratte",
"Read :count time|Read :count times": ":count-mal gelesen",
"Read :count time|Read :count times": "Lese :count Mal|Lese :count Mal",
"Record a loan": "Darlehen aufzeichnen",
"Record your mood": "Stimmung aufzeichnen",
"Recovery Code": "Wiederherstellungscode",
Expand Down Expand Up @@ -826,8 +826,7 @@
"Sign in to your account": "Melden Sie sich bei Ihrem Konto an",
"Sign up for an account": "Melden Sie sich für ein Konto an",
"Sikh": "Sikh",
"Slept :count hours": ":count Stunden geschlafen",
"Slept :number hours": "Geschlafen :number Stunden",
"Slept :count hour|Slept :count hours": ":count Stunde geschlafen|:count Stunden geschlafen",
"Slice of life": "Schnitzel des Lebens",
"Slices of life": "Scheiben des Lebens",
"Small animal": "Kleintier",
Expand Down
15 changes: 7 additions & 8 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"+ prefix": "+ prefijo",
"+ pronoun": "+ pronombre",
"+ suffix": "+ sufijo",
":count contact|:count contacts": ":count contactos",
":count hours slept": ":count horas dormidas",
":count contact|:count contacts": ":count contacto|:count contactos",
":count hour slept|:count hours slept": ":count hora dormida|:count horas dormidas",
":count min read": ":count minutos de lectura.",
":count post|:count posts": ":count publicaciones.",
":count template section|:count template sections": ":count secciones de plantilla.",
":count word|:count words": ":count palabras.",
":count post|:count posts": ":count publicación|:count publicaciones",
":count template section|:count template sections": ":count sección de plantilla|:count secciones de plantilla",
":count word|:count words": ":count palabra|:count palabras",
":distance km": ":distance km",
":distance miles": ":distance millas",
":name called": ":name llamó",
Expand Down Expand Up @@ -739,7 +739,7 @@
"Rabbit": "Conejo",
"Ran": "Corrió",
"Rat": "Rata",
"Read :count time|Read :count times": "Leído :count veces.",
"Read :count time|Read :count times": "Leído :count vez|Leído :count veces",
"Record a loan": "Registrar un préstamo",
"Record your mood": "Registra tu estado de ánimo",
"Recovery Code": "Código de recuperación",
Expand Down Expand Up @@ -826,8 +826,7 @@
"Sign in to your account": "Inicia sesión en tu cuenta",
"Sign up for an account": "Regístrate para obtener una cuenta",
"Sikh": "Sij",
"Slept :count hours": "Durmió :count horas",
"Slept :number hours": "Durmió :number horas",
"Slept :count hour|Slept :count hours": "Dormido :count hora|Dormido :count horas",
"Slice of life": "Fragmento de vida.",
"Slices of life": "Instantáneas de la vida",
"Small animal": "Animal pequeño",
Expand Down
7 changes: 3 additions & 4 deletions lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"+ pronoun": "+ pronom",
"+ suffix": "+ suffixe",
":count contact|:count contacts": ":count contact|:count contacts",
":count hours slept": ":count heures de sommeil",
":count hour slept|:count hours slept": ":count heure de sommeil|:count heures de sommeil",
":count min read": ":count min de lecture",
":count post|:count posts": ":count publication|:count publications",
":count template section|:count template sections": ":count section de modèle|:count sections de modèle",
Expand Down Expand Up @@ -739,7 +739,7 @@
"Rabbit": "Lapin",
"Ran": "A couru",
"Rat": "Rat",
"Read :count time|Read :count times": "Lu :count fois",
"Read :count time|Read :count times": "Lu :count fois|Lu :count fois",
"Record a loan": "Enregistrer un prêt",
"Record your mood": "Enregistrer votre humeur",
"Recovery Code": "Code de récupération",
Expand Down Expand Up @@ -826,8 +826,7 @@
"Sign in to your account": "Connectez-vous à votre compte",
"Sign up for an account": "Créer un compte",
"Sikh": "Sikh",
"Slept :count hours": "A dormi :count heures",
"Slept :number hours": "A dormi :number heures",
"Slept :count hour|Slept :count hours": "A dormi :count heure|A dormi :count heures",
"Slice of life": "Tranche de vie",
"Slices of life": "Tranches de vie",
"Small animal": "Petit animal",
Expand Down
3 changes: 1 addition & 2 deletions lang/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,7 @@
"Sign in to your account": "",
"Sign up for an account": "",
"Sikh": "",
"Slept :count hours": "",
"Slept :number hours": "",
"Slept :count hour|Slept :count hours": "",
"Slice of life": "",
"Slices of life": "",
"Small animal": "",
Expand Down
15 changes: 7 additions & 8 deletions lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"+ prefix": "+ prefisso",
"+ pronoun": "+ pronome",
"+ suffix": "+ suffisso",
":count contact|:count contacts": ":count contatti",
":count hours slept": ":count ore di sonno",
":count contact|:count contacts": ":count contatto|:count contatti",
":count hour slept|:count hours slept": ":count ora di sonno|:count ore di sonno",
":count min read": "Lettura di :count minuti",
":count post|:count posts": ":count post",
":count template section|:count template sections": ":count sezioni del modello",
":count word|:count words": ":count parole",
":count post|:count posts": ":count post|:count post",
":count template section|:count template sections": ":count sezione del modello|:count sezioni del modello",
":count word|:count words": ":count parola|:count parole",
":distance km": ":distance km",
":distance miles": ":distance miglia",
":name called": ":name ha chiamato",
Expand Down Expand Up @@ -739,7 +739,7 @@
"Rabbit": "Conigli",
"Ran": "Corso",
"Rat": "Ratti",
"Read :count time|Read :count times": "Letto :count volte",
"Read :count time|Read :count times": "Letto :count volta|Letto :count volte",
"Record a loan": "Registra un prestito",
"Record your mood": "Registra il tuo stato d'animo",
"Recovery Code": "Codice di ripristino",
Expand Down Expand Up @@ -826,8 +826,7 @@
"Sign in to your account": "Accedi al tuo account",
"Sign up for an account": "Registrati per un account",
"Sikh": "Sikh",
"Slept :count hours": "Hai dormito :count ore",
"Slept :number hours": "Hai dormito :number ore",
"Slept :count hour|Slept :count hours": "Ha dormito :count ora|Ha dormito :count ore",
"Slice of life": "Pezzo di vita",
"Slices of life": "Fette di vita",
"Small animal": "Piccoli animali",
Expand Down
15 changes: 7 additions & 8 deletions lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"+ prefix": "+ prefixo",
"+ pronoun": "+ pronome",
"+ suffix": "+ sufixo",
":count contact|:count contacts": ":count contatos",
":count hours slept": ":count horas dormidas",
":count contact|:count contacts": ":contagem contato|:contagem contatos",
":count hour slept|:count hours slept": ":contagem hora dormida|:contagem horas dormidas",
":count min read": ":contagem min de leitura",
":count post|:count posts": ":contagem posts",
":count template section|:count template sections": ":contagem seções do modelo",
":count word|:count words": ":contagem palavras",
":count post|:count posts": ":contagem post|:contagem posts",
":count template section|:count template sections": ":contagem seção do modelo|:contagem seções do modelo",
":count word|:count words": ":contagem palavra|:contagem palavras",
":distance km": ":distance km",
":distance miles": ":distance milhas",
":name called": ":name ligou",
Expand Down Expand Up @@ -739,7 +739,7 @@
"Rabbit": "Coelho",
"Ran": "Corri",
"Rat": "Rato",
"Read :count time|Read :count times": "Lido :contagem vezes",
"Read :count time|Read :count times": "Lido :count vez|Lido :count vezes",
"Record a loan": "Registrar um empréstimo",
"Record your mood": "Registrar seu humor",
"Recovery Code": "Código de Recuperação",
Expand Down Expand Up @@ -826,8 +826,7 @@
"Sign in to your account": "Entre na sua conta",
"Sign up for an account": "Inscreva-se pra uma conta",
"Sikh": "Sikh",
"Slept :count hours": "Dormiu :count horas",
"Slept :number hours": "Dormiu :number horas",
"Slept :count hour|Slept :count hours": "Dormiu :count hora|Dormiu :count horas",
"Slice of life": "Pedacinho da vida",
"Slices of life": "Fatias de vida",
"Small animal": "Animal pequeno",
Expand Down
5 changes: 2 additions & 3 deletions lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"+ pronoun": "+ местоимение",
"+ suffix": "+ суффикс",
":count contact|:count contacts": ":count контакт|:count контакта|:count контактов",
":count hours slept": ":count часов сна",
":count hour slept|:count hours slept": "1 час спал|:count часа спал|:count часов спал",
":count min read": ":count мин чтения|:count мин чтения|:count мин чтения",
":count post|:count posts": ":count пост|:count поста|:count постов",
":count template section|:count template sections": ":count раздел шаблона|:count раздела шаблона|:count разделов шаблона",
Expand Down Expand Up @@ -826,8 +826,7 @@
"Sign in to your account": "Войти в свой аккаунт",
"Sign up for an account": "Зарегистрироваться",
"Sikh": "Сикх",
"Slept :count hours": "Спал :count часов",
"Slept :number hours": "Спал :number часов",
"Slept :count hour|Slept :count hours": "Спал :count час|Спал :count часа|Спал :count часов",
"Slice of life": "Нарезка жизни",
"Slices of life": "Нарезки жизни",
"Small animal": "Маленькое животное",
Expand Down
6 changes: 5 additions & 1 deletion resources/js/Pages/Vault/Calendar/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ const get = (day) => {
d="M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z" />
</svg>

{{ $t(':count hours slept', { count: mood.number_of_hours_slept }) }}
{{
$tChoice(':count hour slept|:count hours slept', mood.number_of_hours_slept, {
count: mood.number_of_hours_slept,
})
}}
</div>

<!-- note -->
Expand Down
16 changes: 10 additions & 6 deletions resources/js/Pages/Vault/Journal/Post/Show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,13 @@ defineProps({
:key="mood.id"
class="item-list border-b border-gray-200 p-3 hover:bg-slate-50 dark:border-gray-700 dark:bg-slate-900 hover:dark:bg-slate-800">
<span>{{ mood.mood_tracking_parameter.label }}</span>
<span class="block text-sm" v-if="mood.number_of_hours_slept">{{
$t('Slept :count hours', { count: mood.number_of_hours_slept })
}}</span>
<span class="block text-sm" v-if="mood.number_of_hours_slept">
{{
$tChoice('Slept :count hour|Slept :count hours', mood.number_of_hours_slept, {
count: mood.number_of_hours_slept,
})
}}
</span>
<span v-if="mood.note" class="block text-sm">{{ mood.note }}</span>
</li>
</ul>
Expand All @@ -222,9 +226,9 @@ defineProps({
<!-- options -->
<ul class="mb-6 text-sm">
<li class="flex items-center">
<inertia-link :href="data.url.edit" class="text-blue-500 hover:underline">{{
$t('Edit post')
}}</inertia-link>
<inertia-link :href="data.url.edit" class="text-blue-500 hover:underline">
{{ $t('Edit post') }}
</inertia-link>
</li>
</ul>
</div>
Expand Down
12 changes: 9 additions & 3 deletions resources/js/Shared/Modules/FeedItems/MoodTrackingEvent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@
d="M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z" />
</svg>

<span>{{
$t('Slept :number hours', { number: data.mood_tracking_event.object.number_of_hours_slept })
}}</span>
<span>
{{
$tChoice(
'Slept :count hour|Slept :count hours',
data.mood_tracking_event.object.number_of_hours_slept,
{ count: data.mood_tracking_event.object.number_of_hours_slept },
)
}}
</span>
</div>
</div>

Expand Down

0 comments on commit 721abb9

Please sign in to comment.