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:
committed by
GitHub
parent
a5107518b5
commit
6b14ecfdf9
@@ -95,6 +95,11 @@ const RoomStateHistory: React.FC<{
|
||||
const StateEventButton: React.FC<StateEventButtonProps> = ({ label, onClick }) => {
|
||||
const trimmed = label.trim();
|
||||
|
||||
let content = label;
|
||||
if (!trimmed) {
|
||||
content = label.length > 0 ? _t("<%(count)s spaces>", { count: label.length }) : _t("<empty string>");
|
||||
}
|
||||
|
||||
return (
|
||||
<button
|
||||
className={classNames("mx_DevTools_button", {
|
||||
@@ -103,7 +108,7 @@ const StateEventButton: React.FC<StateEventButtonProps> = ({ label, onClick }) =
|
||||
})}
|
||||
onClick={onClick}
|
||||
>
|
||||
{trimmed ? label : _t("<%(count)s spaces>", { count: label.length })}
|
||||
{content}
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user