Skip to content

Commit 26fb14d

Browse files
authored
Merge pull request #13527 from woocommerce/fix_login_library_translations
Support appending local libraries strings
2 parents 41ac328 + 062a76e commit 26fb14d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fastlane/Fastfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ REMOTE_LIBRARIES_STRINGS_PATHS = [
4949
exclusions: []
5050
}
5151
].freeze
52+
LOCAL_LIBRARIES_STRINGS_PATHS = [
53+
# NOTE: for those we don't set `add_ignore_attr` to true because we currently use `checkDependencies true` in `WooCommerce/build.gradle`
54+
# Which will correctly detect strings from the app's `strings.xml` being used by one of the module.
55+
{ library: 'Login Library', strings_path: './libs/login/src/main/res/values/strings.xml', source_id: 'module:login' }
56+
].freeze
5257

5358
# URL of the GlotPress project containing the app's strings
5459
GLOTPRESS_APP_STRINGS_PROJECT_URL = 'https://translate.wordpress.com/projects/woocommerce/woocommerce-android/'
@@ -766,6 +771,9 @@ platform :android do
766771
#
767772
desc 'Merge libraries strings files into the main app one'
768773
lane :localize_libs do
774+
# Merge `strings.xml` files of libraries hosted in this repo (in `./libs` folder) into the `strings.xml` of the main app
775+
an_localize_libs(app_strings_path: MAIN_STRINGS_PATH, libs_strings_path: LOCAL_LIBRARIES_STRINGS_PATHS)
776+
769777
REMOTE_LIBRARIES_STRINGS_PATHS.each do |lib|
770778
download_path = android_download_file_by_version(
771779
library_name: lib[:name],

0 commit comments

Comments
 (0)