Skip to content

Commit d766d4c

Browse files
TheoChevalierflodolo
authored andcommitted
Fix nits, enable unlocalized-all by default, remove a few experimental flags
* Display filtering info for gecko_strings only * Remove some experimental flags, and switch unlocalized-all with unlocalized * Prevent huge error log files in unlocalized_words_all.php * Update README.md and fix typos
1 parent d1dbaa3 commit d766d4c

8 files changed

+16
-13
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
Transvision is a Web application targeting the Mozilla localization community, created and maintained by the French Mozilla community (https://www.mozfr.org).
55

6-
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 (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, validity checks for localized access keys in the UI, or comparison views between Mozilla repository channels (Nightly/Beta/Release).
6+
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).
77

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

@@ -21,7 +21,7 @@ The Transvision team uses Git and GitHub for both development and issue tracking
2121
- If you'd like to contribute code back to us, you can do it using a [Pull Request][].
2222
- We generate automatic documentation of [Transvision classes][].
2323
- If you want to chat with the team, you can find us on IRC in [![#transvision IRC channel](https://kiwiirc.com/buttons/irc.mozilla.org/transvision.png)](https://kiwiirc.com/client/irc.mozilla.org/?nick=github_vis|?#transvision) (#transvision channel on irc.mozilla.org server).
24-
- If you want to file a bug [Create a new issue on github][] or contact the team.
24+
- If you want to file a bug [Create a new issue on GitHub][] or contact the team.
2525

2626
## Dependencies
2727

@@ -46,7 +46,7 @@ A PHP script is available in `app/scripts/check_requirements` to check the most
4646
1. Fork the [Transvision Project][] into your GitHub account.
4747
2. Clone your fork to your machine.
4848
3. Copy `app/config/config.ini-dist` to `app/config/config.ini` and adapt the variables to your system.
49-
4. Run first `app/scripts/setup.sh`, then `app/scripts/glossaire.sh`. This process will take some time as it downloads the source code for all Mozilla products (~20GB of data).
49+
4. Run first `app/scripts/setup.sh`, then `app/scripts/glossaire.sh`. This process will take some time as it downloads several repositories (~2GB of data).
5050
5. Install Composer (Dependency Manager for PHP, https://getcomposer.org/) and run `php composer.phar install` (or "composer install" if installed globally) inside the web folder.
5151
6. You can run Transvision in your local machine either with the ```start.sh``` script or with ```php -S localhost:8082 -t web/ app/inc/router.php``` and opening http://localhost:8082/ with your browser. To bound PHP internal web server to 0.0.0.0 use ```start.sh -remote```: the server will be accessible from other devices on the LAN, or from the host machine in case Transvision is running inside a virtual machine.
5252

app/config/config.ini-dev

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ local_svn=/temp
2424
; Only needed for production setup
2525
libraries=/temp
2626

27-
; Flag to know if we are working in production more or development mode
27+
; Flag to know if we are working in production mode or development mode
2828
dev=true
2929

3030
; Flag to display page time generation and memory usage in console logs (development mode only)

app/config/config.ini-dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ config=/home/pascalc/repos/github/transvision/app/config
2929
; URL to l10n web service. Wrap the value between quotes if the URL contains special characters like ~
3030
l10nwebservice = "https://l10n.mozilla-community.org/mozilla-l10n-query/"
3131

32-
; Flag to know if we are working in production more or development mode
32+
; Flag to know if we are working in production mode or development mode
3333
dev=false
3434

3535
; Github secret key for continuous integration on Beta site

app/config/config.ini-travis

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ local_svn=/home/travis/build/mozfr/transvision/data/svn
2929
; This path is used to store libraries (e.g. compare-locales)
3030
libraries=/home/travis/build/mozfr/transvision/data/libraries
3131

32-
; Flag to know if we are working in production more or development mode
32+
; Flag to know if we are working in production mode or development mode
3333
dev=true

app/inc/dispatcher.php

-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
$template = false;
4949
break;
5050
case 'consistency':
51-
$experimental = true;
5251
$controller = 'consistency';
5352
$page_title = 'Translation Consistency';
5453
$page_descr = 'Analyze translation consistency across repositories.';
@@ -66,7 +65,6 @@
6665
$js_files[] = '/js/select_all.js';
6766
break;
6867
case 'empty-strings':
69-
$experimental = true;
7068
$controller = 'empty_strings';
7169
$page_title = 'Empty Strings';
7270
$page_descr = '';
@@ -116,14 +114,12 @@
116114
$js_files[] = '/js/sorttable.js';
117115
break;
118116
case 'unlocalized':
119-
$experimental = true;
120117
$controller = 'unlocalized_words';
121118
$page_title = 'Commonly Unlocalized Words';
122119
$page_descr = 'Display the list of the most common untranslated words. Click on the table headers to sort results.';
123120
$js_files[] = '/js/sorttable.js';
124121
break;
125122
case 'unlocalized-all':
126-
$experimental = true;
127123
$controller = 'unlocalized_words';
128124
$page_title = 'Commonly Unlocalized Words (Global view)';
129125
$page_descr = 'Display the list of the most common untranslated words for all locales. Click on the table headers to sort results.';

app/models/consistency.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@
4646
// Remove blanks strings. Using 'strlen' to avoid filtering out strings set to 0
4747
$target_strings = array_filter(Utils::getRepoStrings($locale, $repo), 'strlen');
4848

49-
if (! empty($source_strings)) {
49+
// No filtered component by default
50+
$filter_message = '';
51+
52+
if (! empty($source_strings) && $repo == 'gecko_strings') {
5053
// Remove known problematic strings
5154
$duplicated_strings_english = Consistency::filterStrings($source_strings, $repo);
5255

app/views/templates/base.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
{$li_link('unchangedstrings', 'Display all strings identical to English', 'Unchanged Strings')}
5050
</ul>
5151
<ul>
52-
{$li_link('unlocalized_all', 'Display common words remaining in English', 'Unlocalized Words')}
52+
{$li_link('unlocalized', 'Display common words remaining in English', 'Unlocalized Words')}
5353
{$li_link('consistency', 'Translation Consistency', 'Translation Consistency')}
5454
{$li_link('showrepos', 'Check the health status of locales', 'Health Status Overview')}
5555
{$li_link('productization', 'Show productization aspects', 'Productization')}

app/views/unlocalized_words_all.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727
</tr>
2828
</thead>
2929
<tbody>
30-
<?php foreach ($unlocalized_words as $english_term => $locales) : ?>
30+
<?php foreach ($unlocalized_words as $english_term => $locales) :
31+
if (! $locales) {
32+
$locales = [];
33+
}
34+
?>
3135
<tr><td><?=$english_term?></td><?php
3236
foreach ($all_locales as $locale) {
3337
$count = 0;

0 commit comments

Comments
 (0)