-
Notifications
You must be signed in to change notification settings - Fork 821
Update prompt for UI blocks #7032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
escattone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an improvement on the existing prior-translation-wiki-map, but I don't think it will affect the UI elements, which are covered by the menu, button, and pref tags. I think we'd have to include those tags in the prior-translation-wiki-map in order to improve the handling of the UI elements.
|
No objections on this. Shall we do this iteratively and merge this improvement? |
escattone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+wc
kitsune/llm/l10n/prompt.py
Outdated
| - A Python `dict` maps keys to their values. | ||
| - Each `wiki-hook`, `wiki-article-link`, and `wiki-external-link` in the {{ source_language }} text of the "prior translation" becomes a key in the `prior-translation-wiki-map`, and each key's value is its corresponding translation found in the {{ target_language }} text of the "prior translation". | ||
| - **IMPORTANT**: Extract **ALL** `wiki-hook`, `wiki-article-link`, and `wiki-external-link` elements from the **ENTIRE** {{ source_language }} text of the "prior translation". Each element becomes a key in the `prior-translation-wiki-map`, and each key's value is its corresponding translation found in the {{ target_language }} text of the "prior translation". | ||
| - This map preserves human-localized wiki elements, which **must be reused** whenever those elements appear anywhere in your translation, regardless of whether they appear in changed or unchanged sections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use "This `prior-translation-wiki-map` ..." instead of "This map ..." just to be crystal clear.
kitsune/llm/l10n/prompt.py
Outdated
| 4. For each part that is different, **freshly translate** that part. **Remember to obey the `Rules for translating special strings`**. | ||
| 4. For each part that is different, **freshly translate** that part: | ||
| - **Remember to obey ALL of the `Rules for translating special strings`**. | ||
| - **CRITICAL**: Even in different/changed parts, you **MUST** check the `prior-translation-wiki-map` for every wiki element (per Rule #3) before translating. This ensures already-localized UI elements are preserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use wiki elements instead of UI elements.
87ec0d6 to
e514df4
Compare
No description provided.