@@ -25,50 +25,6 @@ class Project
2525 'calendar ' => 'Lightning ' ,
2626 ];
2727
28- /**
29- * Read all supported Gaia versions.
30- *
31- * @return array list of supported Gaia versions
32- */
33- public static function getSupportedGaiaVersions ()
34- {
35- // Gaia versions are dynamically read from gaia_versions.txt
36- $ file_name = APP_SOURCES . 'gaia_versions.txt ' ;
37-
38- $ supported_versions = [];
39- if (file_exists ($ file_name )) {
40- $ gaia_versions = file ($ file_name , FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES );
41- foreach ($ gaia_versions as $ gaia_version ) {
42- if ($ gaia_version == 'gaia ' ) {
43- $ supported_versions += [
44- 'gaia ' => 'Gaia master ' ,
45- ];
46- } else {
47- $ repo_name = "gaia_ {$ gaia_version }" ;
48- $ repo_description = 'Gaia ' . str_replace ('_ ' , '. ' , $ gaia_version );
49- $ supported_versions += [
50- $ repo_name => $ repo_description ,
51- ];
52- }
53- }
54- }
55-
56- return $ supported_versions ;
57- }
58-
59- /**
60- * Return the most updated Gaia branch besides master
61- *
62- * @return string name of the most updated Gaia branch
63- */
64- public static function getLastGaiaBranch ()
65- {
66- $ gaia_repos = array_keys (self ::getSupportedGaiaVersions ());
67- rsort ($ gaia_repos );
68-
69- return reset ($ gaia_repos );
70- }
71-
7228 /**
7329 * Create a list of all supported repositories.
7430 *
@@ -106,7 +62,7 @@ public static function getRepositories()
10662 /**
10763 * Get the list of repositories with their Display name.
10864 * The array has repo folder names as keys and Display names as value:
109- * ex: ['gaia_1_4 ' => 'Gaia 1.4 ', 'mozilla_org' => 'mozilla.org']
65+ * ex: ['firefox_ios ' => 'Firefox for iOS ', 'mozilla_org' => 'mozilla.org']
11066 *
11167 * @return array list of local repositories and their Display names
11268 */
@@ -115,24 +71,6 @@ public static function getRepositoriesNames()
11571 return self ::getSupportedRepositories ();
11672 }
11773
118- /**
119- * Get the list of repositories for Gaia.
120- * The list is sorted by age (latest master -> older branch)
121- *
122- * @return array list of local repositories for Gaia
123- */
124- public static function getGaiaRepositories ()
125- {
126- $ gaia_repos = array_keys (self ::getSupportedGaiaVersions ());
127- rsort ($ gaia_repos );
128-
129- // 'gaia' repo is the latest master branch, always first
130- array_pop ($ gaia_repos );
131- array_unshift ($ gaia_repos , 'gaia ' );
132-
133- return $ gaia_repos ;
134- }
135-
13674 /**
13775 * Get the list of repositories for desktop applications
13876 *
@@ -142,8 +80,7 @@ public static function getDesktopRepositories()
14280 {
14381 return array_diff (
14482 self ::getRepositories (),
145- ['mozilla_org ' , 'firefox_ios ' ],
146- self ::getGaiaRepositories ()
83+ ['mozilla_org ' , 'firefox_ios ' ]
14784 );
14885 }
14986
@@ -228,8 +165,7 @@ public static function isValidRepository($repository)
228165
229166 /**
230167 * Return the correct locale code based on context
231- * For example: given "es", returns "es-ES" for Bugzilla,
232- * "es" for Gaia, "es-ES" for other repos.
168+ * For example: given "es", returns "es-ES" for Bugzilla.
233169 *
234170 * @param string $locale Name of the current locale
235171 * @param string $context The context we need to use this locale in
@@ -248,22 +184,6 @@ public static function getLocaleInContext($locale, $context)
248184 'sr-Latn ' => 'sr ' ,
249185 ];
250186
251- // Gaia locales
252- $ locale_mappings ['gaia ' ] = [
253- 'es-AR ' => 'es ' ,
254- 'es-CL ' => 'es ' ,
255- 'es-ES ' => 'es ' ,
256- 'es-MX ' => 'es ' ,
257- 'gu-IN ' => 'gu ' ,
258- 'pa-IN ' => 'pa ' ,
259- 'sr ' => 'sr-Cyrl ' ,
260- ];
261-
262- // Use Gaia mapping for all Gaia repositories
263- if (Strings::startsWith ($ context , 'gaia ' )) {
264- $ context = 'gaia ' ;
265- }
266-
267187 // Firefox for iOS
268188 $ locale_mappings ['firefox_ios ' ] = [
269189 'es-AR ' => 'es ' ,
0 commit comments