-
Notifications
You must be signed in to change notification settings - Fork 117
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
VPN-6763: Do not include shared translations when importing addon-specific ts files #10091
Merged
mcleinman
merged 6 commits into
main
from
do_not_include_shared_translations_in_ts_files
Dec 5, 2024
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
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 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
This is not reliable. The FIrefox extension addon uses shared strings, but no strings with
vpn.commonString
IDs.https://github.com/mozilla-mobile/mozilla-vpn-client/blob/main/addons/message_try_firefox_extension/manifest.json
Can we use the ts_file to go back to the addon manifest, and check for
"usesSharedStrings": true
?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.
Worth noting that I don't see the code going through
message_try_firefox_extension
for some reason (not sure if it's because my system is only partially set up).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 think this was indeed due to my system.
Something like this is clunky but could work?
Not sure why I'm getting an error onManifest file not found: mozilla-vpn-client/addons/message_update_v2.24/manifest.json
. I can see the .ts file being generated, but that addon doesn't exist in/addons
🤔Never mind, this was in
build-addons
, coming from a previous attempt with multiple branches enabled. Testing this stuff is a huge PITA.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 want to
die
if the manifest file isn't found, because it should always be there.To get this working, I had to have similar logic in two spots - doing it once at the start (on the branch the user was on when calling the script), then once again each time we loop through the release branches. I really do not like this pattern, but it's in line with how this file currently handles things - it does a bunch of work on the first branch, then essentially duplicates most of those calls (and adds in calls that combine the various files) for each release branch in the for loop.
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.
Good catch, and I'm sorry - my fix neglects a situation where none of the shared strings are a common string.
Agreed testing this is somewhat awful, thanks for all your support with it.
To answer another question: Shared strings for messages are indeed all or nothing. Either all strings come from that file, or we use the old fashioned way. (My intention would be to use only the new shared file moving forward.)