Skip to content

Commit

Permalink
Drop Focus projects (#976)
Browse files Browse the repository at this point in the history
* Drop Focus for Android, Focus for iOS
* Drop php 7.0 from Travis
  • Loading branch information
flodolo committed Sep 3, 2019
1 parent 2ebf41a commit 4a14006
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 106 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ cache:
- $HOME/.composer/cache/files
php:
- 5.6
- 7.0
- 7.2
- 7.3
before_install:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
29 changes: 2 additions & 27 deletions app/classes/Transvision/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -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',
],
];

Expand Down
6 changes: 2 additions & 4 deletions app/scripts/bash_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
15 changes: 9 additions & 6 deletions app/scripts/clean_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 1 addition & 3 deletions app/scripts/glossaire.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 0 additions & 14 deletions app/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions tests/units/Transvision/AnalyseStrings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
[],
[],
],
];
}

Expand Down
3 changes: 0 additions & 3 deletions tests/units/Transvision/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public function isDesktopRepositoryDP()
return [
['gecko_strings', true],
['firefox_ios', false],
['focus_ios', false],
['mozilla_org', false],
['randomrepo', false],
];
Expand Down Expand Up @@ -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'],
];
}

Expand Down
24 changes: 0 additions & 24 deletions tests/units/Transvision/ShowResults.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,30 +452,6 @@ public function getEditLinkDP()
'it',
'',
],
[
'pontoon',
'focus_ios',
'focus_ios/focus-ios.xliff:4e0bc9d4',
'test',
'it',
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/focus-for-ios/focus-ios.xliff?search=test'>&lt;edit in Pontoon&gt;</a>",
],
[
'pontoon',
'focus_ios',
'focus_ios/focus-ios.xliff:4e0bc9d4',
'@@missing@@',
'it',
'',
],
[
'pontoon',
'focus_ios',
'focus_ios/focus-ios.xliff:4e0bc9d4',
'<em class="error">Warning: Missing string</em>',
'it',
'',
],
// Test URLencode
[
'pontoon',
Expand Down
15 changes: 0 additions & 15 deletions tests/units/Transvision/VersionControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ public function getVCSDP()
[
'firefox_ios', 'git',
],
[
'focus_ios', 'git',
],
];
}

Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 4a14006

Please sign in to comment.