update notice

This commit is contained in:
vapormusic 2022-02-12 10:23:25 +07:00
parent 8c0bf85419
commit 0c364753cf
3 changed files with 22 additions and 1 deletions

View file

@ -9,6 +9,26 @@ Some notes about Cider's i18n support.
- Most of the strings in the content area are provided and translated by Apple themselves, and do not need to be translated. - Most of the strings in the content area are provided and translated by Apple themselves, and do not need to be translated.
- The language Apple Music uses are dependent on the storefront region. - The language Apple Music uses are dependent on the storefront region.
# Multiple Plural Forms
Multiple plural forms can be supported as below:
The keys and its meanings are here : https://github.com/prantlf/fast-plural-rules/blob/master/docs/languages.md#supported-languages
For example , English is in Plural rule #1 and has 2 keys ```one``` and ```other```
Russian is in Plural rule #7 (3 forms) : ```one```, ```few``` and ```other```
How it is implemented for English:
```
"term.track": {
"one" : "track",
"other" : "tracks"
},
```
## Localization Notices ## Localization Notices

View file

@ -124,6 +124,7 @@
"term.contributors": "Contributors", "term.contributors": "Contributors",
"term.equalizer": "Equalizer", "term.equalizer": "Equalizer",
"term.reset": "Reset", "term.reset": "Reset",
// Example for multiple plural forms : look up the key for your language in https://github.com/prantlf/fast-plural-rules/blob/master/docs/languages.md#supported-languages
"term.track": { "term.track": {
"one" : "track", "one" : "track",
"other" : "tracks" "other" : "tracks"

View file

@ -331,7 +331,7 @@ const app = new Vue({
} else { } else {
// fallback English plural forms ( old i18n ) // fallback English plural forms ( old i18n )
if (options["count"] > 1) { if (options["count"] > 1) {
return this.lz[message+ "s"] ?? this.lz[message]} else { return this.lz[message]} return this.lz[message+ "s"] ?? this.lz[message]} else { return this.lz[message] ?? this.lz[message+ "s"]}
} }
} else if(typeof this.lz[message] === "object") { } else if(typeof this.lz[message] === "object") {
return (this.lz[message])[Object.keys(this.lz[message])[0]] return (this.lz[message])[Object.keys(this.lz[message])[0]]