mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-27 17:26:23 +00:00
28 lines
546 B
Perl
Executable File
28 lines
546 B
Perl
Executable File
#! /usr/bin/perl -wp
|
|
|
|
use strict;
|
|
our %trans;
|
|
|
|
BEGIN {
|
|
require "utils/wmltrans.pm";
|
|
%trans = readwml ('data/translations/english.cfg');
|
|
}
|
|
|
|
while (m/^(.*)translate_string\(\"([^\"]*)\"\)(.*)/) {
|
|
my $str = $trans{$2};
|
|
unless (defined $str) {
|
|
print STDERR "no translation found for \"$2\"\n";
|
|
last;
|
|
}
|
|
$_ = "$1_(\"$str\")$3\n";
|
|
}
|
|
|
|
while (m/^(.*)string_table\[\"([^\"]*)\"\](.*)/) {
|
|
my $str = $trans{$2};
|
|
unless (defined $str) {
|
|
print STDERR "no translation found for \"$2\"\n";
|
|
last;
|
|
}
|
|
$_ = "$1_(\"$str\")$3\n";
|
|
}
|