-
Notifications
You must be signed in to change notification settings - Fork 130
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
Support appending local libraries strings #13527
base: trunk
Are you sure you want to change the base?
Conversation
So `strings.xml` of local libraries will be part of main app translations.
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
@@ -49,6 +49,12 @@ REMOTE_LIBRARIES_STRINGS_PATHS = [ | |||
exclusions: [] | |||
} | |||
].freeze | |||
LOCAL_LIBRARIES_STRINGS_PATHS = [ | |||
# NOTE: for those we don't set `add_ignore_attr` to true because we currently use `checkDependencies true` in `WordPress/build.gradle` |
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 comment mentions WordPress/build.gradle
and this line in it. You should probably update the comment for the case of WC (and check if you need to enable checkDependencies true
in lint { }
for WC's build.gradle
config too if not already?
@@ -739,6 +745,9 @@ platform :android do | |||
# | |||
desc 'Merge libraries strings files into the main app one' | |||
lane :localize_libs do | |||
# Merge `strings.xml` files of libraries that are hosted locally in the repository (in `./libs` folder) |
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 guessing this is just a copy/paste of the comment from WP, but reading it now it felt a bit hard to parse/understand. What about:
# Merge `strings.xml` files of libraries that are hosted locally in the repository (in `./libs` folder) | |
# Merge `strings.xml` files of libraries hosted in this repo (in `./libs` folder) into the `strings.xml` of the main app | |
# (so that they can all be uploaded in a single GlotPress project) |
I think the simplest way would be to:
I'd expect any string you added or modified in the lib's string file should be reflected in the main app's strings file after you ran the lane. PS: I'm not 100% sure what's supposed to happen for strings you remove from the libs' string, i.e. if our |
So
strings.xml
of local libraries will be part of main app translations.Description
This PR fixes an issue, which excluded strings of
login
module (formerly known asWordPress-Login-Flow-Android
) after it has been merged to this repository.This solution is inspired (copy-pasted) from WordPress Android codebase.
Testing information
I'm not sure how to test this change, so I'm open for suggestions.
The tests that have been performed
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: