Repository navigation
Conversation
`uk.xaml` was written against `main` @ `2a75118f`. Three commits that landed while STranslate#782 was open added keys to every other language, but could not add them to Ukrainian, because `uk.xaml` did not exist upstream yet: - 8 keys in `src/STranslate/Languages/uk.xaml` — pinned image translation (STranslate#769) and the notification-only fallback for text selection; - 78 keys in the Youdao plugin dictionary — the localized API error messages. So Ukrainian users saw English text in those places: the missing keys resolve through the English dictionaries, which stay merged for the whole session (`LoadDefaultLanguage` loads every plugin's `en.xaml` and then clears `_oldResources`, so `RemoveOldLanguageFiles` never takes them out). The one case where the raw `No Translation for key ...` shows up is a plugin installed in the current session: `LoadInstalledPluginLanguages` merges only the active language for it until the next restart. Both files are back to the `en.xaml` key set *and* order: 792/792 for the main dictionary, 82/82 for the plugin, with the blank-line section breaks in the same places, so each file is now line-for-line structurally identical to its `en.xaml`. Insertions only, no existing line is touched. Verified: `dotnet build -c Debug` 0 errors, `dotnet test` 296/296, every language dictionary in the tree loads through `XamlReader.Load` with the same key count as its `en.xaml` neighbour, and the new values pass LanguageTool with the `uk-UA` profile with no remaining warnings.
pasharm
force-pushed
the
fix/complete-ukrainian-dictionaries
branch
from
September 9, 2026 15:38
cea05d9 to
2f95765
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
English
uk.xamlwas written againstmain@2a75118f. Three commits that landed while #782 was open added keys to every other language, but could not add them to Ukrainian, becauseuk.xamldid not exist upstream yet:ukfeat: add an optional configurable Compact pin shortcut,refine pinned image translation windows(#769)feat: add notification-only fallback for text selection failurefix: localize Youdao API error messages across all supported languagesSo at the moment #782 was merged,
src/STranslate/Languages/uk.xamlhad 784 keys against 792 in every other language, and the Youdao plugin dictionary had 4 against 82. Ukrainian was the only language left behind —ru,fa,tr,ja,ko,zh-cn,zh-twhave no gaps.This PR fills both files. They are back to the
en.xamlkey set and order — 792/792 for the main dictionary, 82/82 for the plugin — with the blank-line section breaks in the same places, so each file is now line-for-line structurally identical to itsen.xaml. Insertions only: no existing line is touched.What users saw
English text in those places. The missing keys resolve through the English dictionaries, which stay merged for the whole session:
LoadDefaultLanguageloads every plugin'sen.xamland then clears_oldResources, soRemoveOldLanguageFilesnever takes them out again. The literalNo Translation for key ...appears in one narrower case — a plugin installed during the current session, whereLoadInstalledPluginLanguagesmerges only the active language until the next restart.Translation
Values were translated from the English and Chinese sources (Chinese being the original) and kept consistent with the terminology already in
uk.xaml:розпізнавання(recognition),озвучення/синтез мовлення(TTS),застосунок(application),запит(request),вивантаження(upload),Повторіть спробу пізніше(try again later),не підтримується(not supported).PinisЗакріпити, matching the existingHotkey_ToggleTopmost→Закріпити поверх усіх вікон.All 86 values were run through LanguageTool with the
uk-UAprofile; the warnings it raised are fixed, and the current text comes back clean.Verification
Windows 10 x64, .NET SDK 10, on top of
main@fa640384:dotnet build src/STranslate.slnx -c Debug— 0 errors;dotnet test src/STranslate.slnx— 296/296 passing;en.xamlkey by key: 792/792 and 82/82, zero differences; the blank/comment layout of both files matchesen.xamlline for line;{0}/{1}placeholders compared per key — zero mismatches;XamlReader.Load, and in each folder every language reports the same key count as itsen.xaml;中文
uk.xaml是基于main@2a75118f编写的。#782 在 09-04 至 09-09 期间开启,这段时间内合入的三个提交为其他所有语言补充了新 key,但当时上游还没有uk.xaml,因此乌克兰语被漏下:uk缺少feat: add an optional configurable Compact pin shortcut、refine pinned image translation windows(#769)feat: add notification-only fallback for text selection failurefix: localize Youdao API error messages across all supported languages因此在 #782 合入时,
src/STranslate/Languages/uk.xaml只有 784 个 key(其他语言 792 个),有道插件词典只有 4 个(应为 82 个)。乌克兰语是唯一被漏下的语言:ru、fa、tr、ja、ko、zh-cn、zh-tw均无缺失。本 PR 补齐这两个文件:与
en.xaml的 key 集合与顺序完全一致(主词典 792/792,插件 82/82),空行分节的位置也一致,因此两个文件现在与各自的en.xaml逐行同构。只有新增行,未改动任何既有行。用户实际看到的是什么
是英文文案。缺失的 key 会落到英文词典上,而英文词典在整个会话期间都留在
MergedDictionaries里:LoadDefaultLanguage会加载每个插件的en.xaml,随后清空_oldResources,因此RemoveOldLanguageFiles不会再把它们移除。只有一种较窄的情况会出现No Translation for key ...原文:插件是在当前会话中安装的,此时LoadInstalledPluginLanguages只合并当前语言,直到下次重启。翻译
译文依据英文与中文原文(中文为原始文案)翻译,术语与已合入的
uk.xaml保持一致:розпізнавання(识别)、озвучення/синтез мовлення(语音合成)、застосунок(应用)、запит(请求)、вивантаження(上传)、Повторіть спробу пізніше(稍后重试)、не підтримується(不受支持)。Pin译作Закріпити,与既有的Hotkey_ToggleTopmost→Закріпити поверх усіх вікон一致。全部 86 条译文都用 LanguageTool 的
uk-UA配置检查过,提示到的问题均已修正,当前文本无告警。验证
Windows 10 x64,.NET SDK 10,基于
main@fa640384:dotnet build src/STranslate.slnx -c Debug—— 0 错误;dotnet test src/STranslate.slnx—— 296/296 通过;en.xaml逐 key 比对集合与顺序:792/792、82/82,无差异;两个文件的空行与注释布局也与en.xaml逐行一致;{0}/{1}占位符:无差异;XamlReader.Load加载,且每个目录下各语言的 key 数量与en.xaml相同;