pontoon icon indicating copy to clipboard operation
pontoon copied to clipboard

On source repo change, import translations from corresponding l10n files

Open bugzilla-to-github opened this issue 8 years ago • 6 comments

This issue was created automatically by a script.

Bug 1372151

Bug Reporter: @flodolo CC: @guerojeff, @Pike, [email protected], @Delphine, @mathjazz, @MikkCZ, @TheoChevalier Blocker for: Bug 1361017

https://hg.mozilla.org/mozilla-central/diff/27cad9749cdd/mobile/android/base/locales/en-US/android_strings.dtd

This changeset resurrects two strings in android_strings.dtd

Since the changeset backed out landed after bug 1361017, those strings were never removed from the file, e.g. for cs https://hg.mozilla.org/l10n-central/cs/file/dfe6771ce975/mobile/android/base/android_strings.dtd#l289

Nonetheless, Pontoon doesn't read them from the file and show them as missing.

bugzilla-to-github avatar Jun 11 '17 21:06 bugzilla-to-github

Comment Author: @Pike

This is probably an over-optimization by only syncing files that change.

I think we should do a read-only sync on l10n files for which en-US changes. That way, we don't get race conditions by hitting an l10n sync before an en-US sync if we do changes on both sides.

But also we read back existing translations for back-outs.

bugzilla-to-github avatar Jun 11 '17 21:06 bugzilla-to-github

Comment Author: @mathjazz

*** Bug #1359412 has been marked as a duplicate of this bug. ***

bugzilla-to-github avatar Jul 10 '17 22:07 bugzilla-to-github

Comment Author: @mathjazz

*** Bug #1433955 has been marked as a duplicate of this bug. ***

bugzilla-to-github avatar Jan 29 '18 00:01 bugzilla-to-github

Comment Author: @mathjazz

This bug is preventing us to sync translations for read-only locales which translate strings as they land in the quarantine repository.

So as the first step, I'll add a patch that will "sync l10n files for which en-US changes" - only for read-only locales. That will also allow us to monitor performance implications and possibly "just remove the if" if they turn out to be bearable.

bugzilla-to-github avatar Aug 08 '18 03:08 bugzilla-to-github

Comment Author: GitHub Bugzilla PR Linker <[email protected]>

Created attachment 8998911 Link to GitHub pull-request: https://github.com/mozilla/pontoon/pull/1054

Attached file: file_207380338.txt (text/x-github-pull-request, 44 bytes) Description: Link to GitHub pull-request: https://github.com/mozilla/pontoon/pull/1054

bugzilla-to-github avatar Aug 09 '18 02:08 bugzilla-to-github

Comment Author: @github-actions

Commit pushed to master at https://github.com/mozilla/pontoon

https://github.com/mozilla/pontoon/commit/fb5a8ba4741591bb94cfacb6ddfe1254e0c90b6d Bug #1372151: sync l10n files for which source files change (#1054)

This patch syncs l10n files for which source file change, but only for read-only and changed locales for now.

To fully fix the bug, we should sync these files for all locales, but that would have a pretty substantial negative impact on sync performance (because we'd need to clone all locale repositories).

If source files change, we make sure that:

  • First, at least read-only locales are pulled.
  • Second, VCSResources are created for corresponding locale files for all locales we have previously pulled.
  • DB entities are collected from added and changed source files.

Other changes:

  • Pass paths to changed source files to sync_translations() more consistently with passing added and removed files. Also use more consistent variable names. This patch was promised a while ago: https://github.com/mozilla/pontoon/pull/688#discussion_r135601377
  • Rename new_paths to added_paths for consistency across the code base.
  • obsolete_entities_paths are included in changed_paths. That allows us to remove a good deal of code.

bugzilla-to-github avatar Aug 13 '18 18:08 bugzilla-to-github