Closed dcalhoun closed 6 months ago
My thought is that we should verify the i18n features continue working as expected after this change, but that there is likely little risk merging this in the meantime to repair CI builds and finish integrating into the host apps.
@fluiddot I requested your review as I perceive you are fairly familiar with the i18n scripts. I lack confidence as to which files I should verify are created. I'm going to continue researching, but let me know if there are key artifacts I should verify. Thanks! 🙇🏻
From reading the i18n docs (which are great) and testing the outcome of npm run bundle
, my thought is that the proposed changes are stable. I did not observe any unexpected string removals from the generated bundle files.
@fluiddot I requested your review as I perceive you are fairly familiar with the i18n scripts. I lack confidence as to which files I should verify are created. I'm going to continue researching, but let me know if there are key artifacts I should verify. Thanks! 🙇🏻
Sounds good, I can take a look. The artifacts to check are the localization strings files:
We can test adding two strings in Gutenberg to verify if they are updated:
Apart from this, we could optionally check the intermediate files generated in the i18 update process. But this requires tweaking the code/using different CLI parameters to avoid removing those files as are temporary (example).
UPDATE: We could use the npm command i18n:update:test
to check the intermediate files.
Thank you for the guidance, testing, and review! 🙇🏻
Merging this to keep the React Native upgrade moving forward. I'll continue testing the artifacts and address any issues noted in a separate PR.
I verified both of the following cases function as expected:
We can test adding two strings in Gutenberg to verify if they are updated:
- Add a native-only string. This string should be included in the localization strings files.
- Add a string already used in the web version. This string shouldn't be included in the localization strings files.
I also verified intermediate file generation using i18n:update
by inspecting the temporary directory during script execution.
Apart from this, we could optionally check the intermediate files generated in the i18 update process. But this requires tweaking the code/using different CLI parameters to avoid removing those files as are temporary (example).
UPDATE: We could use the npm command
i18n:update:test
to check the intermediate files.
It appears this change does break the i18n:update:test
command. I will fix that issue in a separate PR.
Description
Certain React Native CLI commands were relocated when
cli-plugin-metro
was moved to the React Native core repository.https://github.com/react-native-community/cli/commit/80c84d019bc2d3b640c03856e7111a6459e62357
This resulted in an inability for
gutenberg-mobile
project scripts to locate commands likebundle
, as thereact-native
package is not installed as direct dependency. Insteadgutenberg-mobile
relies upon the version within thegutenberg
Git submodule.This change relies upon changing directories into the Git submodule so that Node.js module resolution locates the React Native package.
Similar changes were applied to other React Native CLI commands during the React Native 0.73 upgrade.
https://github.com/wordpress-mobile/gutenberg-mobile/commit/e2e5429805fe199f97df58f2dfc9872ac75297dc
Testing Instructions
npm run i18n:update
.PR submission checklist: