Skip to content

Commit

Permalink
Move moment translations to resources
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Oct 26, 2023
1 parent e7b7ba8 commit c329fdc
Show file tree
Hide file tree
Showing 20 changed files with 885 additions and 781 deletions.
Binary file added web/src/ui/assets/Dragoon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion web/src/ui/i18n/i18n.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export const {
useLang,
$lang,
useResolveLocalizedString,
useIsI18nFetching
useIsI18nFetching,
getTranslation
} = createI18nApi<ComponentKey>()(
{
"languages": getEnabledLanguages(),
Expand Down
84 changes: 84 additions & 0 deletions web/src/ui/i18n/resources/de.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,90 @@ Fühlen Sie sich frei, Ihre Kubernetes-Bereitstellungen zu erkunden und die Kont
},
"CommandBar": {
"ok": "Ok"
},
"moment": {
"date format": ({ isSameYear }) =>
`dddd, Do MMMM${isSameYear ? "" : " YYYY"}, HH:mm`,
"past1": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "gerade eben";
case "second":
return "vor einer Sekunde";
case "minute":
return "vor einer Minute";
case "hour":
return "vor einer Stunde";
case "day":
return "gestern";
case "week":
return "letzte Woche";
case "month":
return "letzten Monat";
case "year":
return "letztes Jahr";
}
},
"pastN": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "gerade eben";
case "second":
return "vor # Sekunden";
case "minute":
return "vor # Minuten";
case "hour":
return "vor # Stunden";
case "day":
return "vor # Tagen";
case "week":
return "vor # Wochen";
case "month":
return "vor # Monaten";
case "year":
return "vor # Jahren";
}
},
"future1": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "gerade eben";
case "second":
return "in einer Sekunde";
case "minute":
return "in einer Minute";
case "hour":
return "in einer Stunde";
case "day":
return "morgen";
case "week":
return "nächste Woche";
case "month":
return "nächsten Monat";
case "year":
return "nächstes Jahr";
}
},
"futureN": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "gerade eben";
case "second":
return "in # Sekunden";
case "minute":
return "in # Minuten";
case "hour":
return "in # Stunden";
case "day":
return "in # Tagen";
case "week":
return "in # Wochen";
case "month":
return "in # Monaten";
case "year":
return "in # Jahren";
}
}
}
/* spell-checker: enable */
};
84 changes: 84 additions & 0 deletions web/src/ui/i18n/resources/en.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -607,5 +607,89 @@ Feel free to explore and take charge of your Kubernetes deployments!
},
"CommandBar": {
"ok": "Ok"
},
"moment": {
"date format": ({ isSameYear }) =>
`dddd, MMMM Do${isSameYear ? "" : " YYYY"}, h:mm a`,
"past1": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "just now";
case "second":
return "a second ago";
case "minute":
return "a minute ago";
case "hour":
return "an hour ago";
case "day":
return "yesterday";
case "week":
return "last week";
case "month":
return "last month";
case "year":
return "last year";
}
},
"pastN": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "just now";
case "second":
return "# seconds ago";
case "minute":
return "# minutes ago";
case "hour":
return "# hours ago";
case "day":
return "# days ago";
case "week":
return "# weeks ago";
case "month":
return "# months ago";
case "year":
return "# years ago";
}
},
"future1": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "just now";
case "second":
return "in a second";
case "minute":
return "in a minute";
case "hour":
return "in an hour";
case "day":
return "in a day";
case "week":
return "in a week";
case "month":
return "in a month";
case "year":
return "in a year";
}
},
"futureN": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "just now";
case "second":
return "in # seconds";
case "minute":
return "in # minutes";
case "hour":
return "in # hours";
case "day":
return "in # days";
case "week":
return "in # weeks";
case "month":
return "in # months";
case "year":
return "in # years";
}
}
}
};
84 changes: 84 additions & 0 deletions web/src/ui/i18n/resources/fi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -604,5 +604,89 @@ Tutustu vapaasti ja ota hallintaan Kubernetes-julkaisusi!
},
"CommandBar": {
"ok": "ok"
},
"moment": {
"date format": ({ isSameYear }) =>
`dddd, Do MMMM${isSameYear ? "" : " YYYY"}, HH:mm`,
"past1": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "juuri nyt";
case "second":
return "sekunti sitten";
case "minute":
return "minuutti sitten";
case "hour":
return "tunti sitten";
case "day":
return "eilen";
case "week":
return "viime viikolla";
case "month":
return "viime kuussa";
case "year":
return "viime vuonna";
}
},
"pastN": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "juuri nyt";
case "second":
return "# sekuntia sitten";
case "minute":
return "# minuuttia sitten";
case "hour":
return "# tuntia sitten";
case "day":
return "# päivää sitten";
case "week":
return "# viikkoa sitten";
case "month":
return "# kuukautta sitten";
case "year":
return "# vuotta sitten";
}
},
"future1": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "juuri nyt";
case "second":
return "sekunnin kuluttua";
case "minute":
return "minuutin kuluttua";
case "hour":
return "tunnin kuluttua";
case "day":
return "huomenna";
case "week":
return "ensi viikolla";
case "month":
return "ensi kuussa";
case "year":
return "ensi vuonna";
}
},
"futureN": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "juuri nyt";
case "second":
return "# sekunnin kuluttua";
case "minute":
return "# minuutin kuluttua";
case "hour":
return "# tunnin kuluttua";
case "day":
return "# päivän kuluttua";
case "week":
return "# viikon kuluttua";
case "month":
return "# kuukauden kuluttua";
case "year":
return "# vuoden kuluttua";
}
}
}
};
84 changes: 84 additions & 0 deletions web/src/ui/i18n/resources/fr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,90 @@ N'hésitez pas à explorer et à prendre en main vos déploiements Kubernetes !
},
"CommandBar": {
"ok": "ok"
},
"moment": {
"date format": ({ isSameYear }) =>
`dddd Do MMMM${isSameYear ? "" : " YYYY"} à H[h]mm`,
"past1": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "à l'instant";
case "second":
return "il y a une seconde";
case "minute":
return "il y a une minute";
case "hour":
return "il y a une heure";
case "day":
return "hier";
case "week":
return "la semaine dernière";
case "month":
return "le mois dernier";
case "year":
return "l'année dernière";
}
},
"pastN": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "à l'instant";
case "second":
return "il y a # secondes";
case "minute":
return "il y a # minutes";
case "hour":
return "il y a # heures";
case "day":
return "il y a # jours";
case "week":
return "il y a # semaines";
case "month":
return "il y a # mois";
case "year":
return "il y a # ans";
}
},
"future1": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "à l'instant";
case "second":
return "dans une seconde";
case "minute":
return "dans une minute";
case "hour":
return "dans une heure";
case "day":
return "demain";
case "week":
return "la semaine prochaine";
case "month":
return "le mois prochain";
case "year":
return "l'année prochaine";
}
},
"futureN": ({ divisorKey }) => {
switch (divisorKey) {
case "now":
return "à l'instant";
case "second":
return "dans # secondes";
case "minute":
return "dans # minutes";
case "hour":
return "dans # heures";
case "day":
return "dans # jours";
case "week":
return "dans # semaines";
case "month":
return "dans # mois";
case "year":
return "dans # ans";
}
}
}
/* spell-checker: enable */
};
Loading

0 comments on commit c329fdc

Please sign in to comment.