Re-key all |zero-pluralised translations for Localazy compatibility (#11417)
* Re-key all |zero-pluralised translations for Localazy compatibility * Add missing interpolation variable * i18n * Add test coverage * Improve coverage
This commit is contained in:
parent
a5107518b5
commit
6b14ecfdf9
51 changed files with 270 additions and 158 deletions
|
@ -107,11 +107,18 @@ export default class UploadBar extends React.PureComponent<IProps, IState> {
|
|||
return null;
|
||||
}
|
||||
|
||||
// MUST use var name 'count' for pluralization to kick in
|
||||
const uploadText = _t("Uploading %(filename)s and %(count)s others", {
|
||||
filename: this.state.currentFile,
|
||||
count: this.state.countFiles - 1,
|
||||
});
|
||||
let uploadText: string;
|
||||
if (this.state.countFiles > 1) {
|
||||
// MUST use var name 'count' for pluralization to kick in
|
||||
uploadText = _t("Uploading %(filename)s and %(count)s others", {
|
||||
filename: this.state.currentFile,
|
||||
count: this.state.countFiles - 1,
|
||||
});
|
||||
} else {
|
||||
uploadText = _t("Uploading %(filename)s", {
|
||||
filename: this.state.currentFile,
|
||||
});
|
||||
}
|
||||
|
||||
const uploadSize = fileSize(this.state.currentTotal!);
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue