Localize authentication success message#2617
Open
GLWine wants to merge 3 commits intoEDCD:developfrom
Open
Conversation
Updated message box title and content to use translation functions.
Rixxan
requested changes
Feb 14, 2026
Contributor
Rixxan
left a comment
There was a problem hiding this comment.
Overall, I like the idea. However, there's a few steps that need to be taken before I can send this in.
companion.py
Outdated
| message="Authentication with cAPI Successful.\n" | ||
| "You may now close the Frontier login tab if it is still open.") | ||
| tk.messagebox.showinfo( # type: ignore | ||
| title=tr.tl("Authentication Successful"), |
Contributor
There was a problem hiding this comment.
These need LANG comments for the AST and to be added to en.template.
Similar examples can be found in the code, such as:
label=tr.tl("Open in {URL}").format(URL=url), # LANG: Open Element In Selected Provider
Contributor
Author
There was a problem hiding this comment.
Do you think it will be okay now?
Add two new localization entries to L10n/en.template for companion.py: a messagebox title "Authentication Successful" and a cAPI success body "Authentication with cAPI Successful.{CR}You may now close the Frontier login tab if it is still open." to display after successful authentication.
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.
Description
This PR replaces hardcoded English strings in the Frontier authentication success dialog with translatable strings using the existing
l10ntranslation system. The authentication message shown after successful CAPI authorization (companion.pyline ~670) will now be properly localized based on the user's language preference.Key changes:
titleandmessagestrings withtr.tl()calls{CR}placeholder for the newline character, allowing translators to position line breaks appropriately for their languageTechnical approach:
The translation key contains
{CR}as a placeholder, which is replaced with\nafter translation using.format(). This ensures:.stringsfilesExample Images
N/A - This is a localization change with no visual modifications to the UI layout or styling.
Type of Change
Translation Update / Localization Enhancement
This enables existing UI elements to be properly localized without altering functionality or behavior.
How Tested
Code verification:
tr(translations module) is imported at line 36 ofcompanion.pytr.tl()usage throughout the codebase (error messages, warnings, etc.).format(CR="\n")correctly substitutes the placeholder after translationFallback behavior:
l10nsystem automatically falls back to English if translations are missing, ensuring zero breaking changes for existing users.stringsfile format used by EDMCPattern consistency:
companion.py(lines withtr.tl("Error: ...")){CR}placeholder approach is compatible with Python's.format()method# type: ignoreplacement matches project conventionsNotes
Translation keys added:
For translators:
{CR}placeholder represents a line break and should be preserved in translations{CR}as appropriate for their language's sentence structureCompatibility:
l10ninfrastructureFuture work:
Translation maintainers will need to add corresponding entries to language-specific
.stringsfiles (e.g.,it.strings,de.strings,fr.strings, etc.) to provide localized versions of these messages.The change was committed to the correct source branch (GLWine\develop), and the pull request was opened against the correct target branch (EDCD\develop). The old PR #2614 has been closed in favor of this one.
Attention: @Rixxan