Permalink
Browse files

Fix nits, enable unlocalized-all by default, remove a few experimenta…

…l 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
  • Loading branch information...
TheoChevalier authored and flodolo committed Oct 11, 2017
1 parent d1dbaa3 commit d766d4cf1870f5f8a6ccd3e9a45d8825ad1997c4
View
@@ -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 (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).
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).
Transvision is written in PHP, the string extraction is done with the compare-locales library (Python) and server install/maintenance scripts are in Bash.
@@ -21,7 +21,7 @@ The Transvision team uses Git and GitHub for both development and issue tracking
- If you'd like to contribute code back to us, you can do it using a [Pull Request][].
- We generate automatic documentation of [Transvision classes][].
- 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).
- If you want to file a bug [Create a new issue on github][] or contact the team.
- If you want to file a bug [Create a new issue on GitHub][] or contact the team.
## Dependencies
@@ -46,7 +46,7 @@ A PHP script is available in `app/scripts/check_requirements` to check the most
1. Fork the [Transvision Project][] into your GitHub account.
2. Clone your fork to your machine.
3. Copy `app/config/config.ini-dist` to `app/config/config.ini` and adapt the variables to your system.
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).
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).
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.
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.
@@ -24,7 +24,7 @@ local_svn=/temp
; Only needed for production setup
libraries=/temp
; Flag to know if we are working in production more or development mode
; Flag to know if we are working in production mode or development mode
dev=true
; Flag to display page time generation and memory usage in console logs (development mode only)
@@ -29,7 +29,7 @@ config=/home/pascalc/repos/github/transvision/app/config
; URL to l10n web service. Wrap the value between quotes if the URL contains special characters like ~
l10nwebservice = "https://l10n.mozilla-community.org/mozilla-l10n-query/"
; Flag to know if we are working in production more or development mode
; Flag to know if we are working in production mode or development mode
dev=false
; Github secret key for continuous integration on Beta site
@@ -29,5 +29,5 @@ local_svn=/home/travis/build/mozfr/transvision/data/svn
; This path is used to store libraries (e.g. compare-locales)
libraries=/home/travis/build/mozfr/transvision/data/libraries
; Flag to know if we are working in production more or development mode
; Flag to know if we are working in production mode or development mode
dev=true
View
@@ -48,7 +48,6 @@
$template = false;
break;
case 'consistency':
$experimental = true;
$controller = 'consistency';
$page_title = 'Translation Consistency';
$page_descr = 'Analyze translation consistency across repositories.';
@@ -66,7 +65,6 @@
$js_files[] = '/js/select_all.js';
break;
case 'empty-strings':
$experimental = true;
$controller = 'empty_strings';
$page_title = 'Empty Strings';
$page_descr = '';
@@ -116,14 +114,12 @@
$js_files[] = '/js/sorttable.js';
break;
case 'unlocalized':
$experimental = true;
$controller = 'unlocalized_words';
$page_title = 'Commonly Unlocalized Words';
$page_descr = 'Display the list of the most common untranslated words. Click on the table headers to sort results.';
$js_files[] = '/js/sorttable.js';
break;
case 'unlocalized-all':
$experimental = true;
$controller = 'unlocalized_words';
$page_title = 'Commonly Unlocalized Words (Global view)';
$page_descr = 'Display the list of the most common untranslated words for all locales. Click on the table headers to sort results.';
@@ -46,7 +46,10 @@
// Remove blanks strings. Using 'strlen' to avoid filtering out strings set to 0
$target_strings = array_filter(Utils::getRepoStrings($locale, $repo), 'strlen');
if (! empty($source_strings)) {
// No filtered component by default
$filter_message = '';
if (! empty($source_strings) && $repo == 'gecko_strings') {
// Remove known problematic strings
$duplicated_strings_english = Consistency::filterStrings($source_strings, $repo);
@@ -49,7 +49,7 @@
{$li_link('unchangedstrings', 'Display all strings identical to English', 'Unchanged Strings')}
</ul>
<ul>
{$li_link('unlocalized_all', 'Display common words remaining in English', 'Unlocalized Words')}
{$li_link('unlocalized', 'Display common words remaining in English', 'Unlocalized Words')}
{$li_link('consistency', 'Translation Consistency', 'Translation Consistency')}
{$li_link('showrepos', 'Check the health status of locales', 'Health Status Overview')}
{$li_link('productization', 'Show productization aspects', 'Productization')}
@@ -27,7 +27,11 @@
</tr>
</thead>
<tbody>
<?php foreach ($unlocalized_words as $english_term => $locales) : ?>
<?php foreach ($unlocalized_words as $english_term => $locales) :
if (! $locales) {
$locales = [];
}
?>
<tr><td><?=$english_term?></td><?php
foreach ($all_locales as $locale) {
$count = 0;

0 comments on commit d766d4c

Please sign in to comment.