-
-
Notifications
You must be signed in to change notification settings - Fork 1k
patreon link shouldn't open in the main window #1545
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
If the Patreon word and URL must not be translated is better to take it out of the translations file. Some user can translate them without seeing the description and we will not be aware of that if we no look specifically at that element.
I think is better to have them in the js file and pass them as parameter to the original phrase.
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.
@mikeller what do you think? I have seen that you approved it, so I'm not sure if my suggestion is the right way.
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.
My knowledge of the localization stuff is quite limited, I saw that the string was tagged via an html tag, instead of the usual javascript call, and assumed I had to do everything within the json file.
betaflight-configurator/src/tabs/landing.html
Line 32 in 0b035c1
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.
True, in this case we don't have the possibility to pass parameters 😭. We can:
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 guess if we could add the resource before the i18n stuff fires off?
betaflight-configurator/src/js/LogoManager.js
Lines 102 to 106 in 0b035c1
betaflight-configurator/locales/en/messages.json
Lines 3751 to 3753 in 0b035c1
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'm not saying it is going to break anything - I am just not sure that this is a good way to solve this by adding complexity.
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.
What I understood in your comment, is that splitting the file into two, needs to change the way that we use to include translations/constants in the HTML/JS. That's not true. The i18next localization that we use will search in both files in a transparent manner for the user if configured correctly. So the developer will use the same instructions/code than before, not matter if it is a translation or a constant, so it does not increase the complexity in any way.
The only drawback, is that the developer must be aware that there are two files, and include the messages in the correct one when adding. Nothing more.
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.
That still adds complexity over what we currently have - my suggestion is to keep non-translated and translated strings in the same file, as we currently do, and use some form of indicator to mark not-to-be-translated strings as such, and make it part of the CI build job (or potentially even add hooks to crowdin) to check that these constraints are not violated.
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.
Mergeing this, we can still finish the discussion.
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 have hidden the Patreon link string in Crowdin, but this is not a perfect solution. The users can show the hidden strings (all the languages strings were hidden and we now some users ended translating some of them).