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.
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-5748: Use shared strings for addons #9763
VPN-5748: Use shared strings for addons #9763
Changes from 3 commits
2fd6fd2
2211759
a9eb258
93cec33
23df4ba
bc167dc
f2a76ae
beb34c3
c4177e4
0370e6a
31a70ef
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 don't want to blow the scope up too much, but it seems less than ideal for this to be a top-level config for the message addons. Consider for example, that at some point we want to release an update with some non-trivial messages. Having this exist as a top-level config means that we couldn't re-use any of the messages (even the boring stuff like the title).
Is it possible to have an approach where the addon generation script checks for translations in both the common and addon-specific locations, and chooses the appropriate one (defaulting to strings in the addon-specific location in the event of a conflict)?
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 I caused some confusion here - you can mix generic and one time strings in a message. Is that what you mean? I think the confusion is from my naming of
usesSharedStrings
, and perhaps this variable should be updated.The
strings.yaml
file is meant to handle both reusable strings and one-time strings. While reusable strings will stay in there forever, you can also create some category forspecificMessage
, and then setvpn.specific225UpdateMessage.uniqueBody
for the content butvpn.commonStrings.updateTitle
for the title. The practice would be to delete theuniqueBody
string fromstrings.yaml
when it's no longer needed, but keep the commonStrings around forever. (I tried to give examples both the instructions instrings.yaml
and in the commented out stuff instrings.yaml
, but perhaps that needs to be improved as well.)In that sense,
usesSharedStrings
is poorly named, as it's really a boolean of "do you use the old method or the new method of strings?". If this explanation was helpful and the issue is the naming ofusesSharedStrings
, let me know and I'll update it.