View Issue Details

IDProjectCategoryView StatusLast Update
0026685mantisbtinstallationpublic2020-02-24 16:55
ReporterCamille Desmots Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformDebian Apache2 PostreSQLOSDebian 
Product Version2.22.2 
Summary0026685: Test langs algorithm should index first all the call of "plugin_lang_get()" and "lang_get()" and determin the value needed.
Description

On the page "admin/test_langs.php" there is a long list of all the warning and error issued by analyzing all the language packages.
Instead of comparing the list of variable for each translation, it would be better to list all the occurs of the call of the functions "plugin_lang_get()" and "lang_get()".
For example for the plugin "MantisGraph" we've got the warning :

Checking language files for plugin MantisGraph:
Testing English language file...
Testing language file 'strings_english.txt' (phase 1)...
Testing language file 'strings_english.txt' (phase 2)...
Retrieved 59 languages
Testing language file 'strings_afrikaans.txt' (phase 1)...
WARNING: '$s_plugin_MantisGraph_enabled' is not defined in the English language file
WARNING: '$s_plugin_MantisGraph_disabled' is not defined in the English language file
Testing language file 'strings_afrikaans.txt' (phase 2)...
Testing language file 'strings_arabic.txt' (phase 1)...
Testing language file 'strings_arabic.txt' (phase 2)...
Testing language file 'strings_arabicegyptianspoken.txt' (phase 1)...
Testing language file 'strings_arabicegyptianspoken.txt' (phase 2)...
Testing language file 'strings_asturian.txt' (phase 1)...
Testing language file 'strings_asturian.txt' (phase 2)...
Testing language file 'strings_basque.txt' (phase 1)...
WARNING: '$s_plugin_MantisGraph_graph_bug_page_link' is not defined in the English language file
WARNING: '$s_plugin_MantisGraph_legend_opened' is not defined in the English language file
WARNING: '$s_plugin_MantisGraph_legend_closed' is not defined in the English language file

In fact the file "strings_afrikaans.txt" has only 3 lines :

$s_plugin_MantisGraph_config = 'Voorkeure';
$s_plugin_MantisGraph_enabled = 'Aangeskakel';
$s_plugin_MantisGraph_disabled = 'Afgeskakel';

The variable "$s_plugin_MantisGraph_enabled" in never called.
The mistake is in the "strings_afrikaans.txt" file as it define a variable that is never used.

Steps To Reproduce

Go on the page : admin/test_langs.php

TagsNo tags attached.

Activities

dregad

dregad

2020-02-10 08:58

developer   ~0063599

The foreign-language files are maintained and generated automatically, via translatewiki.net. That should (normally) also take care of removing obsolete strings.

There is nothing wrong with the admin check, which correctly detects that a string is defined in Afrikaans, but does not exist in the reference (English) file.

Issue History

Date Modified Username Field Change
2020-02-10 04:20 Camille Desmots New Issue
2020-02-10 08:58 dregad Assigned To => dregad
2020-02-10 08:58 dregad Status new => resolved
2020-02-10 08:58 dregad Resolution open => no change required
2020-02-10 08:58 dregad Note Added: 0063599
2020-02-24 16:55 atrol Status resolved => closed