Paul Vriens wrote:
Paul Vriens wrote:
Ricardo Filipe wrote:
2009/7/8 Paul Vriens <paul.vriens.w...@gmail.com
<mailto:paul.vriens.w...@gmail.com>>
Ricardo Filipe wrote:
2009/7/8 Paul Vriens <paul.vriens.w...@gmail.com
<mailto:paul.vriens.w...@gmail.com>
<mailto:paul.vriens.w...@gmail.com
<mailto:paul.vriens.w...@gmail.com>>>
Paul Vriens wrote:
Ricardo Filipe wrote:
hi mikolaj,
in transl the Portuguese language (not Portugese :( )
is not
showing most of the neutral strings for it's sublangs
(portugal and brazil).
i think this is not how it should be... in each
sublang it
should show the Neutral derived strings and the
warning that
neutral is being used and should not be used aside
the
language name in the main list, not put neutral
separate in
another hidden page.
as it is now it's hard for me to know what is
translated and
what's not. what do you (and wine devel) think?
could you
please change this?
regards,
Ricardo
------------------------------------------------------------------------
Hi Ricardo,
So you would be happy/happier if we show "Portuguese
(Neutral)"
(with the warning) on the main page next to the
"Portuguese
(Portugal)" and "Portuguese (Brazilian)"?
Just re-read your email. What you like is to have "Portuguese
(Portugal)" show the combination of "Portuguese
(Portugal)" and
"Portuguese (Neutral)", correct? With a warning for the
neutral
resources.
What does this mean for "English (Neutral)" should that be
treated
the same or is Portuguese an exception?
-- Cheers,
Paul.
yes that is what i would like and think is correct showing.
portuguese strings should defer to neutral if none is found in
the sublang, with a warning that they may be incorrect.
i would say english is the exception by having all translated in
SUBLANG_DEFAULT and not separating sublangs as is done with
portuguese resources and others.
as i stated in irc one of these days, i think the solution to
english is to have a SUBLANG_BRITISH or whatever and not assume
neutral is for british english, how it is right now contradicts
the use of wrc which is sublang -> neutral -> default (english).
i'd say english should have all resources in neutral and then
the different ones in sublang_british or sublang_australian or
other.
at least that is what makes sense to me for the process to be
consistent.
The attached patch makes transl behave more or less the way you want
I think.
The rest of the pages look fine to me as well (see attached
screenshots). The only thing not correct in those screenshots is
kernel32 being marked as partial where it should be "not
translated".
It of course also doesn't have the warning in front of it but that
seems trivial. So see this as a proof of concept.
We of course need some kind of consensus here whether this is the
way forward.
-- Cheers,
Paul.
diff --git a/transl/scripts/ver.pl b/transl/scripts/ver.pl
index 9b7f289..dd898d6 100755
--- a/transl/scripts/ver.pl
+++ b/transl/scripts/ver.pl
@@ -83,9 +83,11 @@ $norm_fn = $filename;
$norm_fn =~ s/[^a-zA-Z0-9]/-/g;
#mkdir "$workdir/dumps/$norm_fn";
-...@file_langs = ("009:01");
+...@file_langs = ("009:01","016:01","016:02"); # See also comments
below
#$deflangs{"009:00"} = TRUE;
-$deflangs{"009:01"} = TRUE;
+$deflangs{"009:01"} = TRUE; # Make sure 'English (US)' always
inherits from 'English (Neutral)' if needed
+$deflangs{"016:01"} = TRUE; # Make sure 'Portuguese (Brazilian)'
always inherits from 'Portuguese (Neutral)' if needed
+$deflangs{"016:02"} = TRUE; # Make sure 'Portuguese (Portugal)'
always inherits from 'Portuguese (Neutral)' if needed
while (<STDIN>)
{
that looks almost right, there is a bug though: it's showing non
translated pages as partially translated (e.g. see cryptui and winedbg).
and yeah it would be good to have other people's opinions to see if
this is the right track. it sure helps to have all resources together
to see what's missing.
The attached patch works fine for Portuguese.
Please find attached an improved one that can be used more generic.
With patch now.
--
Cheers,
Paul.
diff --git a/transl/scripts/ver.pl b/transl/scripts/ver.pl
index 9b7f289..484248f 100755
--- a/transl/scripts/ver.pl
+++ b/transl/scripts/ver.pl
@@ -87,6 +87,13 @@ $norm_fn =~ s/[^a-zA-Z0-9]/-/g;
#$deflangs{"009:00"} = TRUE;
$deflangs{"009:01"} = TRUE;
+# Handle neutral for selected languages
+$portuguese_neutral = "016:00";
+...@portuguese_sublangs = ("016:01", "016:02");
+%neutrals = (
+ $portuguese_neutral => [ @portuguese_sublangs ],
+ );
+
while (<STDIN>)
{
if (m/^TYPE NEXT/)
@@ -120,6 +127,17 @@ while (<STDIN>)
$deflangs{$lang} = TRUE;
push @file_langs, $lang;
}
+ if (defined $neutrals{$lang})
+ {
+ foreach $sublang ( 0 .. $#{ $neutrals{$lang} } )
+ {
+ if (not defined $deflangs{$neutrals{$lang}[$sublang]})
+ {
+ $deflangs{$neutrals{$lang}[$sublang]} = TRUE;
+ push @file_langs, $neutrals{$lang}[$sublang];
+ }
+ }
+ }
$reslangs{$type." ".$resource}{$lang} = TRUE;
$transl_count{$lang}++;
next;