L10n:Migration: Difference between revisions

 
(29 intermediate revisions by 2 users not shown)
Line 55: Line 55:
First, visit the l10n dashboard, and migrate the database. Adjust the time to just before the push to beta of en-US. Or either, if aurora at one point was pushed first. The page is https://l10n.mozilla.org/shipping/release/. Also, on that page, switch off `fallback` for Lightning.
First, visit the l10n dashboard, and migrate the database. Adjust the time to just before the push to beta of en-US. Or either, if aurora at one point was pushed first. The page is https://l10n.mozilla.org/shipping/release/. Also, on that page, switch off `fallback` for Lightning.


Notes:
* Do not use wildcards in Mercurial commands, they won't work with --cwd


<pre style="overflow-x:scroll">cd releases/l10n
<pre style="overflow-x:scroll">cd releases/l10n
# This function can be used to ignore locales working on central, e.g.
# isCentralLocale $loc
# if [ $? -eq 1 ] ; then
#  # Ignore locales working on mozilla-central
#  continue
# else
#  # Do something for other locales
# fi
function isCentralLocale () {
  central_locales=(eo es-ES fr it pl ru)
  for locale in ${central_locales[@]}; do
    if [[ $locale == $1 ]]; then
      return 1
    fi
  done
  return 0
}
# Path to migration script, without trailing slash (removed if present)
# Use $HOME instead of ~ if needed
# migration_path="$HOME/mozilla-central/python/devtools/migrate-l10n/migrate"
# migration_path=${migration_path%/}
    
    
for loc in $LOCS; do
for loc in $LOCS; do
   hg -R mozilla-beta/$loc pull -u -r default
  # Default migration actions
   hg -R mozilla-aurora/$loc pull -u -r default
   hg -R releases/l10n/mozilla-beta/$loc pull -u -r default
   hg -R mozilla-beta/$loc no-op-merge -m"Migrating aurora to beta for Firefox 50" $PWD/mozilla-aurora/$loc
   hg -R l10n-central/$loc pull -u -r default
   hg -R mozilla-beta/$loc push -r default ssh://hg.mozilla.org/releases/l10n/mozilla-beta/$loc
   hg -R releases/l10n/mozilla-beta/$loc no-op-merge -m"Migrating central to beta for Firefox 56" $PWD/l10n-central/$loc
  hg -R mozilla-aurora/$loc pull -u -r default mozilla-beta/$loc
   hg -R releases/l10n/mozilla-beta/$loc push -r default ssh://hg.mozilla.org/releases/l10n/mozilla-beta/$loc
  # specific for 51 on aurora:
  if [ -d "mozilla-aurora/$loc/suite/chrome/common" ]
  then
    # Move files to SeaMonkey
    hg --cwd mozilla-aurora/$loc mv toolkit/chrome/mozapps/help suite/chrome/common/helpviewer
    hg --cwd mozilla-aurora/$loc ci -m'Bug 1290756 - Remove Help Viewer from Toolkit, move files to SeaMonkey'
  else
    # Remove folders if SeaMonkey is not available
    hg --cwd mozilla-aurora/$loc rm toolkit/chrome/mozapps/help
    hg --cwd mozilla-aurora/$loc ci -m'Bug 1290756 - Remove Help Viewer from Toolkit'
  fi
done
done
</pre>
As we're continuing the localization with 56 on central, we stop pushing the beta merge to aurora,
so nothing like
<pre style="overflow-x:scroll">  hg -R mozilla-aurora/$loc pull -u -r default mozilla-beta/$loc
</pre>
</pre>


This goes through all locales, does a final pull, does the no-op-merge, and pushes to aurora, and then beta. That way, you minimize the time when commits can create heads.
The following code is to be run for locales we merge from aurora to central:
 
The following should work:  <code>ls | egrep -v "eo|es-ES|fr|it|pl|ru"</code>
 
<pre style="overflow-x:scroll">  # Specific for 55 on central, post 54 aurora:
for loc in $LOCS; do
  hg --cwd l10n-central/$loc pull -u -r default releases/l10n/mozilla-aurora/$loc
  hg --cwd l10n-central/$loc rm mobile/searchplugins
  hg --cwd l10n-central/$loc ci -m 'Bug 1347830, Bug 1324045 - Remove mobile/searchplugins'
 
  hg --cwd l10n-central/$loc mv devtools/client/eyedropper.properties devtools/shared
  hg --cwd l10n-central/$loc ci -m 'Bug 1354647 - Move the eyedropper l10n strings to /devtools/shared/'
 
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/advanced.dtd browser/chrome/browser/preferences-old/advanced.dtd
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/applications.dtd browser/chrome/browser/preferences-old/applications.dtd
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/containers.dtd browser/chrome/browser/preferences-old/containers.dtd
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/containers.properties browser/chrome/browser/preferences-old/containers.properties
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/content.dtd browser/chrome/browser/preferences-old/content.dtd
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/main.dtd browser/chrome/browser/preferences-old/main.dtd
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/preferences.dtd browser/chrome/browser/preferences-old/preferences.dtd
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/preferences.properties browser/chrome/browser/preferences-old/preferences.properties
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/privacy.dtd browser/chrome/browser/preferences-old/privacy.dtd
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/search.dtd browser/chrome/browser/preferences-old/search.dtd
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/security.dtd browser/chrome/browser/preferences-old/security.dtd
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/sync.dtd browser/chrome/browser/preferences-old/sync.dtd
  hg --cwd l10n-central/$loc cp browser/chrome/browser/preferences/tabs.dtd browser/chrome/browser/preferences-old/tabs.dtd
  hg --cwd l10n-central/$loc ci -m 'Bug 1343682 - Create temporary killswitch for preference reorg'
 
  # Push to central
  hg --cwd mozilla-aurora/$loc push -r default ssh://hg.mozilla.org/l10n-central/$loc
done
</pre>
Confirmed users, Bureaucrats and Sysops emeriti
2,976

edits