View Issue Details

IDProjectCategoryView StatusLast Update
0005322mantisbtlocalizationpublic2005-04-18 10:40
Reporterjleuzinger Assigned ToWanderer 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.2 
Fixed in Version1.0.0a1 
Summary0005322: Delete attachment shows empty text and button in German-Version
Description

The 2 strings are not translated in German-Version.
My suggestion for strings_german.txt:

$s_delete_attachment_button = 'Löschen';
$s_delete_attachment_sure_msg = 'Anhang wirklich löschen ?';

TagsNo tags attached.
Attached Files
check_strings.pl.txt (1,432 bytes)   
#!/usr/bin/perl -w
use Getopt::Std;

my $base_path = "/home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2";

#
# command line options
#  -v more verbose output
#
getopts('v'); 

#
# obtain a list of files to check
#
my @lang_files   = sort `find \"$base_path/lang\" -type f -name 'strings_*.txt'`;
my @source_files = sort `find \"$base_path\" -type f -name '*.php'`;

#
# examine all source files to find out which strings should be present
#
print "Reading source files...\n";
my %strings;
foreach my $source_file (@source_files)
{
    chomp $source_file;
    print "  $source_file\n" if defined($opt_v);
    my $content = `cat $source_file`;
    while ($content =~ /.*lang_get\(\s*\'(.*?)\'\s*\)(.*)/)
    {
	$strings{$1} = 1;
	$content = $2;
    }
}

#
# print out a list of strings found
#
if (defined($opt_v))
{
    foreach my $key (sort(keys %strings)) 
    {
	print "  found label $key\n";
    }
}

#
# examine all translation files
#
foreach my $lang_file (@lang_files)
{
    chomp $lang_file;
    print "Checking translation file $lang_file...\n";

    my %cstrings = %strings;
    open(LANGFILE, $lang_file);
    while (my $line = <LANGFILE>)
    {
	if ($line =~ /\$s_(.*?)\s/)
	{
	    print "  found label $1\n" if defined($opt_v);
	    $cstrings{$1} = 0;
	}
    }
    close(LANGFILE);
    foreach my $key (sort(keys %cstrings)) 
    {
	if ($cstrings{$key} > 0)
	{
	    print "  missing label $key\n";
	}
    }
}
check_strings.pl.txt (1,432 bytes)   
checklog.txt (5,371 bytes)   
Reading source files...
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_chinese_simplified.txt...
  missing label delete_attachment_button
  missing label permissions_summary_report
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_chinese_traditional.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_croatian.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_czech.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_danish.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_dutch.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_english.txt...
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_estonian.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_finnish.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_french.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_german.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_hungarian.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_italian.txt...
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_japanese_euc.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_japanese_sjis.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_japanese_utf8.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_korean.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_korean_utf8.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_latvian.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_lithuanian.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_norwegian.txt...
  missing label delete_attachment_button
  missing label permissions_summary_report
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_polish.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_portuguese_brazil.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_portuguese_standard.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_romanian.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_russian.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_russian_koi8.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_serbian.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_slovak.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_slovene.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_spanish.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_swedish.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_turkish.txt...
  missing label delete_attachment_button
Checking translation file /home/vwegert/Entwicklung/PHP/Mantis/versions/mantis-0.19.2/lang/strings_ukrainian.txt...
  missing label delete_attachment_button
checklog.txt (5,371 bytes)   

Activities

jleuzinger

jleuzinger

2005-03-10 07:49

reporter   ~0009506

A general solution to avoid empty texts would be a fallback to the english text if the localized string is not present.
Perhaps with special formatting (color, italic, ...) to point out the lack.

nlangenberg

nlangenberg

2005-03-10 10:27

reporter   ~0009508

btw: these strings are also missing in the dutch text file

vwegert

vwegert

2005-03-15 13:33

reporter   ~0009541

They are missing in a lot of translation files. I hacked together a small perl script that I attached to this note (had to rename the file to .txt due to upload restrictions) which obtains a list of all string labels used and checks all translation files whether every label is covered. I've attached the output, too - maybe someone can make use of it...

Wanderer

Wanderer

2005-03-23 04:09

reporter   ~0009642

Commited to CVS