Skip to content

Commit f6c0636

Browse files
authored
Merge pull request #736 from devforth/feature/AdminForth/1609/add-few-languages-support-out-
feat: add getSpaDir to ICodeInjector, use English plural rule for untranslated strings in Slavic locales AdminForth/1609/add-few-languages-support-out-
2 parents b642b66 + cae162c commit f6c0636

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎adminforth/spa/src/i18n.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import { createApp } from 'vue';
44

55
// taken from here https://vue-i18n.intlify.dev/guide/essentials/pluralization.html#custom-pluralization
66
function slavicPluralRule(choice: number, choicesLength: number, orgRule: any) {
7+
// not translated yet string has 2 English forms, forms 2-4 and 5+ do not exist in it
8+
if (choicesLength === 2) {
9+
return choice === 1 ? 0 : 1
10+
}
711
if (choice === 0) {
812
return 0
913
}

‎adminforth/types/Back.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export interface ICodeInjector {
2929
devServerPort: number;
3030

3131
getServeDir(): string;
32+
getSpaDir(): string;
3233
registerCustomComponent(filePath: string): void;
3334
spaTmpPath(): string;
3435
}

0 commit comments

Comments
 (0)