Repository navigation
Translatable collector messages (schema 4) - #18
Merged
Merged
Conversation
Warnings, service errors and the Jira error become messages with a code, params and the English text. Report schema 4. The page renders Russian from the code and params and falls back to the text.
Ruff 0.17 adds datetime to ICN001's conventions. Russian: genitive after 'из' in the shipped count, number-neutral commit limit, dative and accusative resource forms, clearer range and pick texts.
3 tasks done
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.
The page could translate its own texts but not what
collectwrote: warnings, service errors and the Jira error reached it as finished English sentences. Now they carry a code and params, so the page renders them in Russian.Report (breaking, schema 4)
Messagemodel:code(MessageCode),params,text(the English rendering, as before).Service.warningsislist[Message];Service.errorandJiraState.errorareMessage | None.ci_disabled,environments_disabled,no_default_branch,no_production,commits_truncated,tags_truncated,merged_elsewhere,gitlab_unreachable,gitlab_status,gitlab_denied,jira_token_rejected,jira_status,jira_unreachable._messages.pyfactories); the page usestextfor English, so the wording is not duplicated.JiraErrorcarries itsMessage;_jira.pybuilds it.text, unchanged except one case below.Behaviour changes
--jiraservice whose project lookup fails now goes throughexplain_failurelike the others:team/web: GitLab returned 404 for the project.instead of the raw API path, and a 403 lists where to check access.white-space: pre-line); they used to collapse into one line.Page
MESSAGES.ruholds one renderer per code;message(item)falls back totextfor English or an unknown code.errorMessages, GitLab feature names and the settings path) stay as written.Russian wording
Reviewed every Russian string, with a second independent review. Fixes beyond the new messages:
N из M: M is now genitive (4 из 5 MR или коммитов,1 из 21 MR или коммита) via a newrowsOfkey.Достигнут лимит коммитов (N)) and use proper cases for resources (dative after "доступ к", accusative after "получить").Kept on purpose: team jargon (MR, деплой, прод, пайплайн, джоба, скоуп) and "упало, но падать разрешено" over
allow_failure.CI
Ruff 0.17.0 (unpinned in CI) added
datetimeto ICN001, soimport datetime as dtin three modules. Main would fail on its next run without this.Guards
tests/test_page.py:t('...')key used on the page exists inen, andenandruhave the same keys;MessageCodehas a Russian renderer.Both were checked to fail when a key or renderer is removed.
Release
This is 0.6.0. README and the skill now pin
release-scope>=0.6,<0.7; the GitLab job needs the same bump after the release. Clickable URLs in messages are left for a later PR.Checked in the browser with a schema 4 fixture in both languages.