nvda
ba3fe0a7 - Fix l10n regex for unnamed percentages (#18514)

Commit
1 year ago
Fix l10n regex for unnamed percentages (#18514) Fixup of #18503 and #18270 Summary of the issue: The regex to check for unnamed string interpolations doesn't support the %% symbol, which escapes %. This leads to certain usages of it raising incorrect interpolation errors. File source/locale/tr/LC_MESSAGES/nvda.po: 1 error Message starting on line 10286 Original: "%s%%" Translated: "%%%s" Error: unnamed percent interpolations differ Expected: unnamed percent interpolations in this order: ['%s'] The regex for missing names for brace interpolations is not working. i.e. "{}" should raise an error without a name like "{name}". This causes issues where the order of the arguments change in the string. e.g. "Character: {}\nReplacement: {}" being translated to "Replacement: {}\nCharacter: {}" will result in the expected interpolation being in the wrong place. These should be fixed in the source .po files to add names to instances of "{}". Description of user facing changes: Adds a more rigourous check for interpolations using brace formats, which will reduce string errors in the UI.
Author
Parents
Loading