Skip to content

Update i18n cache translation urls and new languages#659

Merged
hypest merged 1 commit intodevelopfrom
update/i18n-cache-url-and-new-lang
Mar 8, 2019
Merged

Update i18n cache translation urls and new languages#659
hypest merged 1 commit intodevelopfrom
update/i18n-cache-url-and-new-lang

Conversation

@Tug
Copy link
Copy Markdown
Contributor

@Tug Tug commented Feb 22, 2019

This PR updates the i18n-cache module to fetch the translation files from https://translate.wordpress.org/projects/wp-plugins/gutenberg directly instead of wp.me.

It also adds new languages that seems to be supported.

Testing Instructions

  • Run yarn clean:i18n-cache
  • Run yarn i18n-cache
  • Check that no translation is failing to download and that they are all available in i18n-cache/data

@Tug Tug self-assigned this Feb 22, 2019
@Tug Tug requested a review from hypest February 22, 2019 17:31
@Tug Tug changed the base branch from develop to release/1.0 February 22, 2019 17:31
@hypest hypest added this to the Future milestone Feb 22, 2019
@hypest hypest closed this Feb 22, 2019
@Tug Tug changed the base branch from release/1.0 to develop February 22, 2019 18:19
@Tug Tug reopened this Feb 22, 2019
];

const getLanguageUrl = ( locale ) => `https://widgets.wp.com/languages/gutenberg/${ locale }.json`;
const getLanguageUrl = ( locale ) => `https://translate.wordpress.org/projects/wp-plugins/gutenberg/dev/${ locale }/default/export-translations\?format\=json`;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we have a good understanding of which code commit is the dev (Development on GlotPress) channel corresponding to? And in particular, how can we know that it perfectly matches the code version of gutenberg-mobile?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will go ahead and merge this PR. It'd still be useful if we can document the potential mismatch between our code version and the translations version on GlotPress.

Copy link
Copy Markdown
Contributor

@hypest hypest left a comment

Choose a reason for hiding this comment

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

Works as advertised @Tug !

I only left a comment about how do we know what exact code version is the translations corresponding to. Let's document that so we have a good understanding of the process.

Copy link
Copy Markdown
Contributor

@hypest hypest left a comment

Choose a reason for hiding this comment

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

LGTM!

@hypest
Copy link
Copy Markdown
Contributor

hypest commented Mar 8, 2019

Tug is AFK these days and I'd prefer if we include this work in the code freeze today so, will merge this myself.

@hypest hypest merged commit 4b0bf8c into develop Mar 8, 2019
@hypest hypest deleted the update/i18n-cache-url-and-new-lang branch March 8, 2019 09:11
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