diff --git a/.travis.yml b/.travis.yml index b16b5f9a..bfb1c004 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ cache: - $HOME/.composer/cache/files php: - 5.6 - - 7.0 - 7.2 - 7.3 before_install: diff --git a/README.md b/README.md index 2afbebb7..cc6abc03 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Transvision is a Web application targeting the Mozilla localization community, created and maintained by the French Mozilla community (https://www.mozfr.org). -The main purpose of Transvision is to provide a specialized search engine to find localized strings in Mozilla code repositories for all Mozilla products (Firefox, Firefox for Android, Firefox for iOS, Focus for iOS, Focus for Android, Thunderbird, SeaMonkey) and websites (currently only www.mozilla.org is supported) via a Web interface. There are also side-features such as checks for common typographical errors for some languages or validity checks for localized access keys in the UI). +The main purpose of Transvision is to provide a specialized search engine to find localized strings in Mozilla code repositories for all Mozilla products (Firefox, Firefox for Android, Firefox for iOS, Android projects, Thunderbird, SeaMonkey) and websites (currently only www.mozilla.org is supported) via a Web interface. There are also side-features such as checks for common typographical errors for some languages or validity checks for localized access keys in the UI). Transvision is written in PHP, the string extraction is done with the compare-locales library (Python) and server install/maintenance scripts are in Bash. diff --git a/app/classes/Transvision/Project.php b/app/classes/Transvision/Project.php index 02f64476..b77373ee 100644 --- a/app/classes/Transvision/Project.php +++ b/app/classes/Transvision/Project.php @@ -64,30 +64,6 @@ class Project 'source_type' => 'xliff', 'variable_patterns' => ['ios'], ], - 'focus_android' => [ - 'files' => [ - 'app.po', - ], - 'git_repository' => 'focus-android-l10n', - 'git_subfolder' => 'locales', - 'pontoon_project' => 'focus-for-android', - 'source_type' => 'gettext', - 'variable_patterns' => ['l10njs', 'printf'], - ], - 'focus_ios' => [ - 'files' => [ - 'focus-ios.xliff', - ], - 'git_repository' => 'focusios-l10n', - 'locale_mapping' => [ - 'bn-IN' => 'bn', - 'bn-BD' => 'bn', - 'son' => 'ses', - ], - 'pontoon_project' => 'focus-for-ios', - 'source_type' => 'xliff', - 'variable_patterns' => ['ios'], - ], 'gecko_strings'=> [ 'source_type' => 'mixed', 'variable_patterns' => ['dtd', 'ftl', 'l10njs', 'printf', 'properties'], @@ -117,12 +93,11 @@ class Project ], // Products using Git 'git' => [ - 'android_l10n', 'firefox_ios', 'focus_android', 'focus_ios', - 'mozilla_org', + 'android_l10n', 'firefox_ios', 'mozilla_org', ], // Products using free text search on Pontoon 'text_search' => [ - 'firefox_ios', 'focus_android', 'focus_ios', 'mozilla_org', + 'firefox_ios', 'mozilla_org', ], ]; diff --git a/app/scripts/bash_variables.sh b/app/scripts/bash_variables.sh index 3619cc02..4af0e765 100644 --- a/app/scripts/bash_variables.sh +++ b/app/scripts/bash_variables.sh @@ -16,9 +16,7 @@ folders+=( $gecko_strings_path $sources_path ) mozilla_org=$local_git/mozilla_org/ folders+=( $mozilla_org ) -# Firefox for iOS, Focus for iOS/Android +# Firefox for iOS, Android-l10n firefox_ios=$local_git/firefox_ios/ -focus_ios=$local_git/focus_ios/ -focus_android=$local_git/focus_android/ android_l10n=$local_git/android_l10n/ -folders+=( $firefox_ios $focus_android $focus_ios $android_l10n) +folders+=( $firefox_ios $android_l10n) diff --git a/app/scripts/clean_data.py b/app/scripts/clean_data.py index 0e22c35a..0d1af1e2 100644 --- a/app/scripts/clean_data.py +++ b/app/scripts/clean_data.py @@ -99,15 +99,18 @@ def main(): # supported by mozilla.org excluded_folders = { 'firefox_ios': ['.git', 'templates'], - 'focus_android': ['.git', 'templates'], - 'focus_ios': ['.git', 'templates'], 'mozilla_org': ['.git', 'en-US', 'hi'], } - # Focus for Android has locales in a subfolder, not in the root - l10n_subfolders = { - 'focus_android': 'locales', - } + ''' + To use if a project has locales in a subfolder, not in the root. + Example: + + l10n_subfolders = { + 'project_name': 'locales', + } + ''' + l10n_subfolders = {} hg_path = config_parser.get('config', 'local_hg') git_path = config_parser.get('config', 'local_git') diff --git a/app/scripts/glossaire.sh b/app/scripts/glossaire.sh index 2c37ee34..7e1ce6a7 100755 --- a/app/scripts/glossaire.sh +++ b/app/scripts/glossaire.sh @@ -271,7 +271,7 @@ function updateOtherProduct() { # $3: extraction script if [ "$checkrepo" = true ] then - # If $1 = "focus_ios", ${!1} is equal to $focus_ios + # If $1 = "firefox_ios", ${!1} is equal to $firefox_ios cd ${!1} echogreen "Update GitHub repository" git pull @@ -299,8 +299,6 @@ source $install/python-venv/bin/activate || exit 1 updateGeckoStringsChannelRepo updateOtherProduct mozilla_org "mozilla.org" tmx_mozillaorg updateOtherProduct firefox_ios "Firefox for iOS" tmx_xliff -updateOtherProduct focus_ios "Focus for iOS" tmx_xliff -updateOtherProduct focus_android "Focus for Android" tmx_gettext updateAndroidl10n # Create a file to get the timestamp of the last string extraction for caching diff --git a/app/scripts/setup.sh b/app/scripts/setup.sh index e3c6580b..6e6a41c9 100755 --- a/app/scripts/setup.sh +++ b/app/scripts/setup.sh @@ -161,20 +161,6 @@ then git clone https://github.com/mozilla-l10n/firefoxios-l10n . fi -cd $focus_ios -if [ ! -d $focus_ios/.git ] -then - echogreen "Checking out Focus for iOS repo" - git clone https://github.com/mozilla-l10n/focusios-l10n . -fi - -cd $focus_android -if [ ! -d $focus_android/.git ] -then - echogreen "Checking out Focus for Android repo" - git clone https://github.com/mozilla-l10n/focus-android-l10n . -fi - cd $android_l10n if [ ! -d $android_l10n/.git ] then diff --git a/tests/units/Transvision/AnalyseStrings.php b/tests/units/Transvision/AnalyseStrings.php index aa2761ba..55c0cc29 100644 --- a/tests/units/Transvision/AnalyseStrings.php +++ b/tests/units/Transvision/AnalyseStrings.php @@ -251,14 +251,6 @@ public function differencesDP() [], [], ], - [ - // Check Focus for iOS has the same results - ['ios:foobar3' => 'Introductory slide %1$@ of %2$@'], - ['ios:foobar3' => 'Introduzione (passaggio %2$@ di %1$@)'], - 'focus_ios', - [], - [], - ], ]; } diff --git a/tests/units/Transvision/Project.php b/tests/units/Transvision/Project.php index de975d07..e5f94bec 100644 --- a/tests/units/Transvision/Project.php +++ b/tests/units/Transvision/Project.php @@ -43,7 +43,6 @@ public function isDesktopRepositoryDP() return [ ['gecko_strings', true], ['firefox_ios', false], - ['focus_ios', false], ['mozilla_org', false], ['randomrepo', false], ]; @@ -139,8 +138,6 @@ public function getLocaleInContextDP() ['es-ES', 'firefox_ios', 'es'], ['es', 'firefox_ios', 'es'], ['son', 'firefox_ios', 'ses'], - ['es-ES', 'focus_ios', 'es-ES'], - ['son', 'focus_ios', 'ses'], ]; } diff --git a/tests/units/Transvision/ShowResults.php b/tests/units/Transvision/ShowResults.php index 9de620cb..0d8ec950 100644 --- a/tests/units/Transvision/ShowResults.php +++ b/tests/units/Transvision/ShowResults.php @@ -452,30 +452,6 @@ public function getEditLinkDP() 'it', '', ], - [ - 'pontoon', - 'focus_ios', - 'focus_ios/focus-ios.xliff:4e0bc9d4', - 'test', - 'it', - " <edit in Pontoon>", - ], - [ - 'pontoon', - 'focus_ios', - 'focus_ios/focus-ios.xliff:4e0bc9d4', - '@@missing@@', - 'it', - '', - ], - [ - 'pontoon', - 'focus_ios', - 'focus_ios/focus-ios.xliff:4e0bc9d4', - 'Warning: Missing string', - 'it', - '', - ], // Test URLencode [ 'pontoon', diff --git a/tests/units/Transvision/VersionControl.php b/tests/units/Transvision/VersionControl.php index dd2b7bff..5836882b 100644 --- a/tests/units/Transvision/VersionControl.php +++ b/tests/units/Transvision/VersionControl.php @@ -20,9 +20,6 @@ public function getVCSDP() [ 'firefox_ios', 'git', ], - [ - 'focus_ios', 'git', - ], ]; } @@ -101,18 +98,6 @@ public function gitPathDP() 'firefox_ios/firefox-ios.xliff:0f4d892c', 'https://github.com/mozilla-l10n/firefoxios-l10n/blob/master/it/firefox-ios.xliff', ], - [ - 'fr', - 'focus_ios', - 'focus_ios/focus-ios.xliff:0f4d892c', - 'https://github.com/mozilla-l10n/focusios-l10n/blob/master/fr/focus-ios.xliff', - ], - [ - 'fr', - 'focus_android', - 'focus_android/app.po:0f4d892c', - 'https://github.com/mozilla-l10n/focus-android-l10n/blob/master/fr/locales/app.po', - ], [ 'sr', 'mozilla_org',