Skip to content
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

Update Transifex resources for our documentation #4478

Merged
merged 1 commit into from
Aug 22, 2018

Conversation

humitos
Copy link
Member

@humitos humitos commented Aug 6, 2018

Sync resources from repository (e.g. created/deleted reST doc files) with Transifex configuration.

$ tx config mapping-bulk \
  --project readthedocs-docs \
  --file-extension '.pot' \
  --source-file-dir locale/pot \
  --source-lang en \
  --type PO \
  --expression 'locale/<lang>/LC_MESSAGES/{filepath}/{filename}.po' \
  --execute

After running this command, I searched and replaced _locale_pot_ by `` (none) to respect the pattern that was used for the resources names. The command, ends with a resource name like:

[readthedocs-docs._locale_pot_embed]

which is replaced to

[readthedocs-docs.embed]

If this PR is approved, we need to run the following command to sync the resources into Transifex:

$ tx push --source

Transifex Docs: https://docs.transifex.com/client/config#configuring-multiple-local-files-(mapping-bulk)

$ tx config mapping-bulk --project readthedocs-docs --file-extension '.pot' --source-file-dir locale/pot --source-lang en --type PO --expression 'locale/<lang>/LC_MESSAGES/{filepath}/{filename}.po' --execute

After running this command, I search and replace `_locale_pot_` by
`` (none) to respect the pattern that was used for the resources names.
@humitos humitos added this to the I18n improvements milestone Aug 6, 2018
@humitos humitos requested a review from a team August 6, 2018 15:13
@ericholscher
Copy link
Member

I don't fully understand this one. Is this just updating our config to match the existing files, or something more?

@humitos
Copy link
Member Author

humitos commented Aug 22, 2018

Yes.

I added the new (missing) files from our docs into Transifex config by using their tool. Although, since their tool uses a different pattern for naming the resources I did a search and replace to match the pattern that we had previously.

That's all that this PR does. With this new config, we should run tx push --source from docs/ directory so new files are pushed as resources to translate in Transifex.

@ericholscher
Copy link
Member

Sounds good.

@ericholscher ericholscher merged commit 16076e0 into master Aug 22, 2018
@stsewd stsewd deleted the humitos/translations/docs-update branch August 22, 2018 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants