Skip to content

Conversation

@rebeccaalpert
Copy link
Contributor

@rebeccaalpert rebeccaalpert commented Oct 29, 2020

I updated the i18n-to-pot script to export pos rather than pot files based on the latest info from translation. I also added a bash script so we can pull out all pos programmatically.

i18n to PO script additions:

  • Appended the language to the header
  • Added merging so existing translations are included in po file
  • Updated the version of the converter library since they accepted my PR to fix their known wrapping issue: Add foldLength option i18next/i18next-gettext-converter#97
  • Added foldLength: 0 option to converter library call so our text doesn't wrap
  • File names from packages now have _package=${package} at the end so I can sort them programmatically
  • Files are exported into frontend/po-files so I don't have to hunt through multiple folders (happy to put these somewhere else if this doesn't make sense)
  • Can now export keys that contain underscores correctly

PO to i18n script additions:

  • Now takes arguments (directory, language) instead of making assumptions
  • User supplies directory they want parsed and the language they want to send files to
  • File names no longer require the language
  • File names from packages must include _package=${package} so it can sort them into the correct locale folders

@spadgett
Copy link
Member

/assign

@rebeccaalpert rebeccaalpert force-pushed the i18n-script branch 3 times, most recently from 8009367 to fcd277f Compare October 29, 2020 17:38
@rebeccaalpert rebeccaalpert changed the title Update i18n export script [WIP] Update i18n export script Oct 29, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 29, 2020
@rebeccaalpert rebeccaalpert changed the title [WIP] Update i18n export script Update i18n export script Nov 3, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 3, 2020
@rebeccaalpert rebeccaalpert changed the title Update i18n export script Update i18n scripts Nov 3, 2020
@rebeccaalpert rebeccaalpert force-pushed the i18n-script branch 2 times, most recently from 38ff210 to bdb7aed Compare November 4, 2020 23:16
@openshift-ci-robot openshift-ci-robot added the component/core Related to console core functionality label Nov 4, 2020
@rebeccaalpert
Copy link
Contributor Author

Rebased package.json.

@rebeccaalpert rebeccaalpert force-pushed the i18n-script branch 3 times, most recently from 3b7eefb to 85f655e Compare November 11, 2020 21:52
@rebeccaalpert
Copy link
Contributor Author

This is ready for review again @spadgett. It blocks the Korean work for next sprint and would make importing files from Terry easier.

Updated script to export pos rather than pot files based on the latest info from our translation contact. I fixed a bug where we couldn't use underscores in keys and also appended the language to the header fields so that information is included. Will add additional fields as necessary. The script now also adds in existing translations and now saves all pos to the same location. I also added a bash script I used to export all pos across the application and updated our po import script to be more flexible.
Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rebeccaalpert, spadgett

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 13, 2020
@openshift-merge-robot openshift-merge-robot merged commit 8a94760 into openshift:master Nov 14, 2020
@spadgett spadgett added this to the v4.7 milestone Nov 16, 2020
rebeccaalpert added a commit to rebeccaalpert/console that referenced this pull request Nov 17, 2020
Added moment.js locale for Korean, removed last language reference in script, updated bash script from openshift#7030 to export Korean po files, and added timestamp in ko folder in public/locales.

Fixes https://issues.redhat.com/browse/CONSOLE-2461
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants