Skip to content

Commit

Permalink
Remove Aurora (#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
flodolo authored and TheoChevalier committed Apr 18, 2017
1 parent da02e46 commit 4d32b5b
Show file tree
Hide file tree
Showing 24 changed files with 51 additions and 69 deletions.
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, Thunderbird, Seamonkey) and websites (currenty 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, validity checks for localized access keys in the UI, or comparison views between Mozilla repository channels (Nightly/Aurora/Beta/Release).
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, Thunderbird, Seamonkey) and websites (currenty 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, validity checks for localized access keys in the UI, or comparison views between Mozilla repository channels (Nightly/Beta/Release).

Transvision is written in PHP, the string extraction is done with the Silme library (Python) and server install/maintenance scripts are in Bash.

Expand Down
2 changes: 1 addition & 1 deletion app/classes/Transvision/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function __construct()
$this->regex_entire_words = false;
$this->each_word = false;
$this->regex_search_terms = '';
$this->repository = 'aurora'; // Most locales work on Aurora
$this->repository = 'central';
$this->search_type = 'strings';
$this->locales = [];
$this->form_checkboxes = array_diff(
Expand Down
12 changes: 6 additions & 6 deletions app/classes/Transvision/ShowResults.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,21 +280,21 @@ public static function getEditLink($tool, $key, $locale)
} else {
switch ($component) {
case 'calendar':
$project_name = 'lightning-aurora';
$project_name = 'lightning';
break;
case 'chat':
case 'editor':
case 'mail':
$project_name = 'thunderbird-aurora';
$project_name = 'thunderbird';
break;
case 'mobile':
$project_name = 'firefox-for-android-aurora';
$project_name = 'firefox-for-android';
break;
case 'suite':
$project_name = 'seamonkey-aurora';
$project_name = 'seamonkey';
break;
default:
$project_name = 'firefox-aurora';
$project_name = 'firefox';
}
$edit_link = "https://pontoon.mozilla.org/{$locale}/{$project_name}/{$fileAndRawString[0]}?search={$fileAndRawString[1]}";
$tool_name = 'Pontoon';
Expand Down Expand Up @@ -396,7 +396,7 @@ public static function resultsTable($search_object, $search_results, $page)
*/
$transliterate = $locale2 == 'sr' && ! $extra_locale && $target_string && $target_string != '@@missing@@';

$edit_link = ($current_repo == 'aurora' && $toolUsedByTargetLocale != '')
$edit_link = ($current_repo == 'central' && $toolUsedByTargetLocale != '')
? self::getEditLink($toolUsedByTargetLocale, $key, $locale2)
: '';

Expand Down
3 changes: 0 additions & 3 deletions app/classes/Transvision/VersionControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public static function hgPath($locale, $repo, $path)
'b2g/branding/official/',
'b2g/branding/unofficial/',
'browser/',
'browser/branding/aurora/',
'browser/branding/nightly/',
'browser/branding/official/',
'browser/branding/unofficial/',
Expand All @@ -97,13 +96,11 @@ public static function hgPath($locale, $repo, $path)
'intl/',
'layout/tools/layout-debug/ui/',
'mail/',
'mail/branding/aurora/',
'mail/branding/nightly/',
'mail/test/resources/mozmill/mozmill/extension/',
'mobile/',
'mobile/android/',
'mobile/android/base/',
'mobile/android/branding/aurora/',
'mobile/android/branding/beta/',
'mobile/android/branding/nightly/',
'mobile/android/branding/official/',
Expand Down
1 change: 0 additions & 1 deletion app/config/list_rep_comm-central.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
./calendar/locales/en-US
./chat/locales/en-US
./editor/ui/locales/en-US
./mail/branding/aurora/locales/en-US
./mail/branding/nightly/locales/en-US
./mail/locales/en-US
./other-licenses/branding/thunderbird/locales/en-US
Expand Down
2 changes: 0 additions & 2 deletions app/config/list_rep_mozilla-central.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
./b2g/branding/official/locales/en-US
./b2g/branding/unofficial/locales/en-US
./b2g/locales/en-US
./browser/branding/aurora/locales/en-US
./browser/branding/nightly/locales/en-US
./browser/branding/official/locales/en-US
./browser/branding/unofficial/locales/en-US
Expand All @@ -13,7 +12,6 @@
./extensions/spellcheck/locales/en-US
./intl/locales/en-US
./mobile/android/base/locales/en-US
./mobile/android/branding/aurora/locales/en-US
./mobile/android/branding/beta/locales/en-US
./mobile/android/branding/nightly/locales/en-US
./mobile/android/branding/official/locales/en-US
Expand Down
2 changes: 1 addition & 1 deletion app/models/channelcomparison.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Transvision;

$chan1 = 'aurora';
$chan1 = 'central';
$chan2 = 'beta';

if (isset($_GET['chan1']) && in_array($_GET['chan1'], $desktop_repos)) {
Expand Down
7 changes: 2 additions & 5 deletions app/scripts/bash_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,18 @@ path_sources=${config}/sources
# PRODUCT repos and list of locales
release_l10n=${local_hg}/RELEASE_L10N
beta_l10n=${local_hg}/BETA_L10N
aurora_l10n=${local_hg}/AURORA_L10N
trunk_l10n=${local_hg}/TRUNK_L10N

release_source=${local_hg}/RELEASE_EN-US
beta_source=${local_hg}/BETA_EN-US
aurora_source=${local_hg}/AURORA_EN-US
trunk_source=${local_hg}/TRUNK_EN-US

trunk_locales=${path_sources}/central.txt
aurora_locales=${path_sources}/aurora.txt
beta_locales=${path_sources}/beta.txt
release_locales=${path_sources}/release.txt

folders+=( $release_l10n $beta_l10n $aurora_l10n $trunk_l10n \
$release_source $beta_source $aurora_source $trunk_source )
folders+=( $release_l10n $beta_l10n $trunk_l10n \
$release_source $beta_source $trunk_source )

# Location of Dotlang-based repos
mozilla_org=$local_git/mozilla_org/
Expand Down
5 changes: 2 additions & 3 deletions app/scripts/glossaire.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ function updateStandardRepo() {
fi
}

local repo_name="$1" # e.g. release, beta, aurora, central
local repo_name="$1" # e.g. release, beta, central
local comm_repo="comm-$1" # e.g. comm-release, etc.
local mozilla_repo="mozilla-$1" # e.g. mozilla-release, etc.
local repo_source="${2}_source" # e.g. release_source, beta_source, aurora_source, trunk_source
local repo_source="${2}_source" # e.g. release_source, beta_source, trunk_source
local repo_l10n="${2}_l10n" # e.g. release_l10n, etc.
local locale_list="${2}_locales" # e.g. release_locales, etc.

Expand Down Expand Up @@ -317,7 +317,6 @@ updateNoBranchRepo "chatzilla"

updateStandardRepo "release" "release"
updateStandardRepo "beta" "beta"
updateStandardRepo "aurora" "aurora"
updateStandardRepo "central" "trunk"

updateFromGitHub
Expand Down
8 changes: 3 additions & 5 deletions app/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function echogreen() {
}

function createSymlinks() {
branches=( trunk aurora beta release )
branches=( trunk beta release )

case "$1" in
"mozilla" | "comm" )
Expand All @@ -38,7 +38,7 @@ function createSymlinks() {
# Possible values: mozilla-central, comm-central
local repo_name="$1-central"
else
# Possible values: mozilla-aurora, comm-aurora, mozilla-beta, etc.
# Possible values: mozilla-beta, comm-beta, etc.
local repo_name="$1-$branch"
fi

Expand Down Expand Up @@ -180,7 +180,7 @@ function initDesktopSourceRepo() {
done
else
local target="$1_source"
# If target="aurora_source", ${!target} is equal to $aurora_source
# If target="beta_source", ${!target} is equal to $beta_source
cd ${!target}
if [ ! -d ${!target}/comm-$1/.hg ]
then
Expand Down Expand Up @@ -257,12 +257,10 @@ setupExternalLibraries
initDesktopSourceRepo "central"
initDesktopSourceRepo "release"
initDesktopSourceRepo "beta"
initDesktopSourceRepo "aurora"

initDesktopL10nRepo "central"
initDesktopL10nRepo "release"
initDesktopL10nRepo "beta"
initDesktopL10nRepo "aurora"

# Create symlinks (or recreate if missing)
createSymlinks "mozilla"
Expand Down
7 changes: 3 additions & 4 deletions app/views/productization.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace Transvision;

// Using Aurora as a reference for simplicity to create the list of locales
$repo = 'aurora';
// Using Central as a reference for simplicity to create the list of locales
$repo = 'central';

require_once INC . 'l10n-init.php';

Expand All @@ -14,7 +14,6 @@

$channels = [
'trunk' => 'Nightly',
'aurora' => 'Developer Edition',
'beta' => 'Beta',
'release' => 'Release',
];
Expand All @@ -34,7 +33,7 @@
$html_output = " <h2>Current locale: {$locale}</h2>\n";

$target_locales_list = Utils::getHtmlSelectOptions(
Project::getRepositoryLocales('aurora'),
Project::getRepositoryLocales('central'),
$locale
);
$product_selector = Utils::getHtmlSelectOptions($products, $product, true);
Expand Down
2 changes: 1 addition & 1 deletion app/views/results_entities.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
// Get the tool used to edit strings for the target locale
$toolUsedByTargetLocale = Project::getLocaleTool($locale);

$edit_link = ($current_repo == 'aurora' && $toolUsedByTargetLocale != '')
$edit_link = ($current_repo == 'central' && $toolUsedByTargetLocale != '')
? ShowResults::getEditLink($toolUsedByTargetLocale, $entity, $locale)
: '';

Expand Down
8 changes: 4 additions & 4 deletions tests/functional/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
['v1/entity/central/?id=browser/chrome/browser/IdontExist', 400, '{"error":"Entity not available"}'],
['v1/search/strings/central/en-US/fr/New%2Bbookmarks/', 200, '{"browser\/chrome\/browser\/places\/bookmarkProperties.properties:dialogTitleAddMulti":{"New Bookmarks":"Nouveaux marque-pages"}}'],
['v1/search/strings/central/en-US/fr/tralala/', 200, '[]'],
['v1/locales/central/', 200, '["ar","ast","cs","de","en-GB","en-US","eo","es-AR","es-CL","es-ES","es-MX","fa","fr","fy-NL","gl","he","hu","id","it","ja","ja-JP-mac","kk","ko","lt","lv","nb-NO","nl","nn-NO","pl","pt-BR","pt-PT","ru","sk","sl","sv-SE","th","tr","uk","vi","zh-CN","zh-TW"]'],
['v1/locales/central/', 200, '["ach","af","an","ar","as","ast","az","be","bg","bn-BD","bn-IN","br","bs","ca","cak","cs","cy","da","de","dsb","el","en-GB","en-US","en-ZA","eo","es-AR","es-CL","es-ES","es-MX","et","eu","fa","ff","fi","fr","fy-NL","ga-IE","gd","gl","gn","gu-IN","he","hi-IN","hr","hsb","hu","hy-AM","id","is","it","ja","ja-JP-mac","ka","kab","kk","km","kn","ko","lij","lo","lt","ltg","lv","mai","mk","ml","mr","ms","my","nb-NO","ne-NP","nl","nn-NO","or","pa-IN","pl","pt-BR","pt-PT","rm","ro","ru","si","sk","sl","son","sq","sr","sv-SE","ta","te","th","tl","tr","trs","tsz","uk","ur","uz","vi","wo","xh","zam","zh-CN","zh-TW"]'],
['v1/locales/iDontExist/', 400, '{"error":"The repo queried (iDontExist) doesn\'t exist."}'],
['v1/repositories/', 200, '["release","beta","aurora","central","firefox_ios","mozilla_org"]'],
['v1/repositories/', 200, '["release","beta","aurora","central","firefox_ios","mozilla_org"]'],
['v1/repositories/fr/', 200, '["aurora","beta","central","firefox_ios","mozilla_org","release"]'],
['v1/repositories/', 200, '["release","beta","central","firefox_ios","mozilla_org"]'],
['v1/repositories/', 200, '["release","beta","central","firefox_ios","mozilla_org"]'],
['v1/repositories/fr/', 200, '["beta","central","firefox_ios","mozilla_org","release"]'],
['v1/suggestions/central/en-US/fr/ar/?max_results=2', 200, '["Bookmark","Marque-page"]'],
['v1/suggestions/central/en-US/fr/ar/?max_results=10', 200, '["Bookmark","Bookmarks","New Bookmarks","Bookmark This Page","Marque-page","Marque-pages","Marquer cette page","Nouveaux marque-pages"]'],
['v1/suggestions/central/en-US/fr/ar/?max_results=0', 200, '["Bookmark","Bookmarks","New Bookmarks","Bookmark This Page","Marque-page","Marque-pages","Marquer cette page","Nouveaux marque-pages"]'],
Expand Down
6 changes: 1 addition & 5 deletions tests/testfiles/config/supported_repositories.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@
"name": "Beta"
},
"3": {
"id": "aurora",
"name": "Aurora"
},
"4": {
"id": "central",
"name": "Central"
},
"5": {
"4": {
"id": "mozilla_org",
"name": "mozilla.org"
}
Expand Down
2 changes: 1 addition & 1 deletion tests/units/Transvision/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function getServiceDP()
['http://foobar/api/v1/entity/central/?id=myid', true],
['http://foobar/api/v1/locales/', true],
['http://foobar/api/v1/search/strings/central/en-US/fr/Add%20%20Bookmarks/', true],
['http://foobar/api/v1/suggestions/aurora/en-US/it/', true],
['http://foobar/api/v1/suggestions/beta/en-US/it/', true],
['http://foobar/api/v1/tm/central/en-US/fr/', true],
['http://foobar/api/versions/', true],
];
Expand Down
2 changes: 1 addition & 1 deletion tests/units/Transvision/AnalyseStrings.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function differencesDP()
[
['browser:foobar2' => '$BrandShortName is already running.\n\nPlease close $BrandShortName prior to launching the version you have just installed.'],
['browser:foobar2' => 'El $BrandFullName ja s\'està executant.\n\nTanqueu el $BrandFullName abans d\'executar la versió que acabeu d\'instal·lar.'],
'aurora',
'beta',
[],
['browser:foobar2'],
],
Expand Down
2 changes: 1 addition & 1 deletion tests/units/Transvision/Consistency.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function filterStrings_DP()
'dom/chrome/accessibility/AccessFu.properties:notation-phasorangle' => 'angle de phaseur',
'apps/system/accessibility.properties:accessibility-listItemsCount[two]' => '{{count}} éléments',
],
'aurora',
'beta',
[
'browser/pdfviewer/viewer.properties:last_page.label' => 'Aller à la dernière page',
'browser/chrome/browser/aboutPrivateBrowsing.dtd:aboutPrivateBrowsing.info.cookies' => 'Les cookies',
Expand Down
5 changes: 2 additions & 3 deletions tests/units/Transvision/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Project extends atoum\test
public function testGetRepositories()
{
$obj = new _Project();
$repos = ['release', 'beta', 'aurora', 'central',
$repos = ['release', 'beta', 'central',
'mozilla_org', ];
$this
->array($obj->getRepositories())
Expand All @@ -24,7 +24,6 @@ public function testGetRepositoriesNames()
$repos = [
'release' => 'Release',
'beta' => 'Beta',
'aurora' => 'Aurora',
'central' => 'Central',
'mozilla_org' => 'mozilla.org',
];
Expand All @@ -36,7 +35,7 @@ public function testGetRepositoriesNames()
public function testGetDesktopRepositories()
{
$obj = new _Project();
$repos = ['release', 'beta', 'aurora', 'central'];
$repos = ['release', 'beta', 'central'];
$this
->array($obj->getDesktopRepositories())
->isEqualTo($repos);
Expand Down
4 changes: 2 additions & 2 deletions tests/units/Transvision/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testConstructor()
->isEqualTo('');
$this
->string($obj->getRepository())
->isEqualTo('aurora');
->isEqualTo('central');
$this
->string($obj->getSearchType())
->isEqualTo('strings');
Expand Down Expand Up @@ -203,7 +203,7 @@ public function testSetRepository()
$obj = new _Search();
$obj->setRepository('foobar');
$this->string($obj->getRepository())
->isEqualTo('aurora');
->isEqualTo('central');

$obj->setRepository('release');
$this->string($obj->getRepository())
Expand Down
14 changes: 7 additions & 7 deletions tests/units/Transvision/ShowResults.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,25 +352,25 @@ public function getEditLinkDP()
'pontoon',
'browser/chrome/browser/browser.properties:webextPerms.hostDescription.allUrls',
'fr',
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/firefox-aurora/browser/chrome/browser/browser.properties?search=webextPerms.hostDescription.allUrls'>&lt;edit in Pontoon&gt;</a>",
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/firefox/browser/chrome/browser/browser.properties?search=webextPerms.hostDescription.allUrls'>&lt;edit in Pontoon&gt;</a>",
],
[
'pontoon',
'calendar/chrome/calendar/calendar.dtd:calendar.calendar.label',
'fr',
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/lightning-aurora/calendar/chrome/calendar/calendar.dtd?search=calendar.calendar.label'>&lt;edit in Pontoon&gt;</a>",
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/lightning/calendar/chrome/calendar/calendar.dtd?search=calendar.calendar.label'>&lt;edit in Pontoon&gt;</a>",
],
[
'pontoon',
'chat/commands.properties:dnd',
'fr',
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/thunderbird-aurora/chat/commands.properties?search=dnd'>&lt;edit in Pontoon&gt;</a>",
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/thunderbird/chat/commands.properties?search=dnd'>&lt;edit in Pontoon&gt;</a>",
],
[
'pontoon',
'editor/ui/chrome/composer/editingOverlay.dtd:fileRecentMenu.label',
'fr',
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/thunderbird-aurora/editor/ui/chrome/composer/editingOverlay.dtd?search=fileRecentMenu.label'>&lt;edit in Pontoon&gt;</a>",
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/thunderbird/editor/ui/chrome/composer/editingOverlay.dtd?search=fileRecentMenu.label'>&lt;edit in Pontoon&gt;</a>",
],
[
'pontoon',
Expand All @@ -382,19 +382,19 @@ public function getEditLinkDP()
'pontoon',
'mail/chrome/messenger/addressbook/abContactsPanel.dtd:ccButton.label',
'de',
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/de/thunderbird-aurora/mail/chrome/messenger/addressbook/abContactsPanel.dtd?search=ccButton.label'>&lt;edit in Pontoon&gt;</a>",
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/de/thunderbird/mail/chrome/messenger/addressbook/abContactsPanel.dtd?search=ccButton.label'>&lt;edit in Pontoon&gt;</a>",
],
[
'pontoon',
'mobile/android/base/android_strings.dtd:activity_stream_highlights',
'bg',
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/bg/firefox-for-android-aurora/mobile/android/base/android_strings.dtd?search=activity_stream_highlights'>&lt;edit in Pontoon&gt;</a>",
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/bg/firefox-for-android/mobile/android/base/android_strings.dtd?search=activity_stream_highlights'>&lt;edit in Pontoon&gt;</a>",
],
[
'pontoon',
'suite/chrome/browser/taskbar.properties:taskbar.tasks.composeMessage.description',
'it',
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/seamonkey-aurora/suite/chrome/browser/taskbar.properties?search=taskbar.tasks.composeMessage.description'>&lt;edit in Pontoon&gt;</a>",
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/seamonkey/suite/chrome/browser/taskbar.properties?search=taskbar.tasks.composeMessage.description'>&lt;edit in Pontoon&gt;</a>",
],
// Locamotion links
[
Expand Down
Loading

0 comments on commit 4d32b5b

Please sign in to comment.