You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry to comment on up such an old commit, but I'm just wondering why this was changed? As far as I know, aapt automatically converts string names containing dots into underscores, so for example the following key:
network.error
will be converted to:
R.string.network_error
Our workflow would like to take advantage of using dot syntax so we can generate structured keys for iOS using SwiftGen but keeping the validation of the twine .txt file intact. Currently, running Twine with validation checks spits out numerous Found key(s) with invalid characters: warnings etc.
One consideration we need to maintain is how this affects all formatters, not just Android's.
I would like to propose that we:
Get a list of valid / invalid characters for all formatters.
Update validate-strings-file for a common set of characters.
Update validate-strings-file to support the --format option to validate the strings file for a particular format. Thus, if --android is passed in, the Android formatter can provide a list of valid or invalid characters for string keys.
I would love to be able to add support for invalid characters by doing our own replacements (like replace < with _ when we generate the localization file for a format that does not support <). However, this adds many complications with consume-localization-file which may not be worth the complexity and effort.
The text was updated successfully, but these errors were encountered:
Finding out the allowed characters is surprisingly painful. Took me an hour to get some information for the two major platforms. Since nobody has complained for the other formatters, how about we use the current character set for the rest (except for Tizen which is identical to Android I guess), @scelis?
From this comment by @robnadin:
One consideration we need to maintain is how this affects all formatters, not just Android's.
I would like to propose that we:
validate-strings-file
for a common set of characters.validate-strings-file
to support the--format
option to validate the strings file for a particular format. Thus, if--android
is passed in, the Android formatter can provide a list of valid or invalid characters for string keys.I would love to be able to add support for invalid characters by doing our own replacements (like replace
<
with_
when we generate the localization file for a format that does not support<
). However, this adds many complications withconsume-localization-file
which may not be worth the complexity and effort.The text was updated successfully, but these errors were encountered: