Based on http://john.albin.net/git/convert-subversion-to-git
This step is not necessary if you already have such a file.
I already created a cleanup file for mozilla.org, the result is in this test repository.
Clone the SVN repository
| #! /usr/bin/env python | |
| import os | |
| import urllib2 | |
| os.system('clear') | |
| base_langchecker = "http://192.168.133.115/langchecker/" | |
| pages = [ |
| #! /usr/bin/env python | |
| import polib | |
| from BeautifulSoup import BeautifulSoup | |
| def stripAllTags(html): | |
| return ''.join(BeautifulSoup(html).findAll(text = True)) | |
| string_count = 0 | |
| word_count = 0 |
| #!/usr/bin/env php | |
| <?php | |
| $command_help = "clean_xliff - Clean localized XLIFF file\n" . | |
| "Usage: clean_xliff [reference_file] [localized file]\n\n" . | |
| "Example: clean_xliff en-US/firefox-ios.xliff it/firefox-ios.xliff\n" . | |
| "(remove obsolete strings from it/firefox-ios.xliff)\n"; | |
| $missing_parameter = "This command needs more parameters, please check mark_active --help.\n"; | |
| if (php_sapi_name() != 'cli') { |
| #! /usr/bin/env python | |
| from glob import glob | |
| from lxml import etree | |
| import argparse | |
| import os | |
| NS = {'x':'urn:oasis:names:tc:xliff:document:1.2'} | |
| def main(): |
Based on http://john.albin.net/git/convert-subversion-to-git
This step is not necessary if you already have such a file.
I already created a cleanup file for mozilla.org, the result is in this test repository.
Clone the SVN repository
| #! /usr/bin/env python | |
| import json | |
| import urllib2 | |
| # URL to extract activated pages from langchecker's json | |
| filename = 'mozorg/plugincheck.lang' | |
| api_url = 'http://l10n.mozilla-community.org/~pascalc/langchecker/?locale=all&website=0&json&file=' + filename | |
| try: |
| #! /usr/bin/env python | |
| ''' This script assumes that localizations are stored in a | |
| structure like the following: | |
| this_script | |
| |__locales | |
| |__locale_code | |
| |__l10n-central | |
| |__mozilla-aurora |
| #!/bin/sh | |
| INCOMPLETE_LOCALES_LIST=$(wget -qO- https://l10n.mozilla-community.org/~flod/webstatus/api/?product=firefox-ios\&type=incomplete\&txt) | |
| INCOMPLETE_LOCALES=(${INCOMPLETE_LOCALES_LIST//$'\n'/ }) | |
| # In case we need to exclude some locales, even if complete and without errors | |
| ADDITIONAL_LOCALES=( | |
| "da" | |
| ) |
| :: Update l10n-central repository with mozilla-aurora changesets. | |
| :: Script for Windows. Save as .cmd file, install TortoiseHg or Mercurial | |
| :: to have hg available from command line. | |
| # CONFIGURE THESE PATHS FOR YOUR SYSTEM | |
| Set aurora_repo="c:\repos\mozilla-aurora-clone" | |
| Set central_repo="c:\repos\l10n-central-clone" | |
| :: Make sure mozilla-aurora local clone is up to date | |
| hg pull -R %aurora_repo% -u default |
| #! /usr/bin/env bash | |
| # Update l10n-central repository with mozilla-aurora changesets. | |
| # Script for Linux/OS X. | |
| # CONFIGURE THESE PATHS FOR YOUR SYSTEM | |
| aurora_repo="/repos/mozilla-aurora-clone" | |
| central_repo="/repos/l10n-central-clone" | |
| # Make sure mozilla-aurora local clone is up to date |