fix(tools): i18n check verifies admin plural() keys
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
1 file changed
+2
-2
@@ -246,7 +246,7 @@ internal sealed partial class I18nCommand : ICommand
|
||||
/// <summary>
|
||||
/// Keys referenced from C# (<c>L("…")</c>, <c>Plural("…")</c>, <c>Loc.Get("…")</c>, and any string literal shaped
|
||||
/// <c>Area.Group.Name</c> whose area has a catalog, since reason and warning keys travel as data), XAML
|
||||
/// (<c>{l:Loc …}</c>) and admin JS (<c>t("…")</c>).
|
||||
/// (<c>{l:Loc …}</c>) and admin JS (<c>t("…")</c>, <c>plural("…")</c>).
|
||||
/// </summary>
|
||||
private static IEnumerable<(string File, string Key)> UsedKeys(string root, IReadOnlySet<string> areas)
|
||||
{
|
||||
@@ -286,7 +286,7 @@ internal sealed partial class I18nCommand : ICommand
|
||||
[GeneratedRegex(@"\{(?:l|loc):Loc\s+(?:Key=)?([A-Z][A-Za-z0-9]*\.[A-Za-z0-9_.]+)")]
|
||||
private static partial Regex XamlKeyRegex();
|
||||
|
||||
[GeneratedRegex(@"(?:\bt\(\s*['""]|data-i18n(?:-[a-z]+)?=['""])([A-Z][A-Za-z0-9]*\.[A-Za-z0-9_.]+)")]
|
||||
[GeneratedRegex(@"(?:\b(?:t|plural)\(\s*['""]|data-i18n(?:-[a-z]+)?=['""])([A-Z][A-Za-z0-9]*\.[A-Za-z0-9_.]+)")]
|
||||
private static partial Regex JsKeyRegex();
|
||||
|
||||
[GeneratedRegex(@"^(one|few|many|other)$")]
|
||||
|
||||
Reference in new issue
Block a user