Only report something in --untranslated-values if it exists in the

target translation. Users should use --keys to check what doesn't
exist in the target.

Add a blacklist for Icelandic at the end of the file.
This commit is contained in:
Ævar Arnfjörð Bjarmason 2009-06-26 18:51:50 +00:00
parent ac0f415915
commit d8889d5ef6

View file

@ -50,10 +50,12 @@ new entries from F<en.yml> to a local file.
=item --untranslated-values =item --untranslated-values
Show keys whose values are either exactly the same between the two Show keys that B<exist in both the compared files> and whose values
files, or don't exist in the target file (the latter file are exactly the same. Use C<--keys> to a list of values that hasn't
specified). The values are pruned according to global and language been merged.
specific blacklists found in the C<__DATA__> section of this script.
The values are pruned according to global and language specific
blacklists found in the C<__DATA__> section of this script.
This helps to find untranslated values. This helps to find untranslated values.
@ -138,7 +140,7 @@ sub print_key_differences
sub untranslated_keys sub untranslated_keys
{ {
my ($from_parsed, $to_parsed) = @_; my ($from_parsed, $to_parsed) = @_;
sort grep { not exists $to_parsed->{$_} or $from_parsed->{$_} eq $to_parsed->{$_} } keys %$from_parsed; sort grep { exists $to_parsed->{$_} and $from_parsed->{$_} eq $to_parsed->{$_} } keys %$from_parsed;
} }
sub prune_untranslated_with_blacklist sub prune_untranslated_with_blacklist
@ -248,6 +250,7 @@ untranslated_values:
layouts.project_name.h1: true layouts.project_name.h1: true
layouts.project_name.title: true layouts.project_name.title: true
site.index.license.project_url: true site.index.license.project_url: true
de: de:
activerecord.attributes.message.sender: true activerecord.attributes.message.sender: true
activerecord.attributes.trace.name: true activerecord.attributes.trace.name: true
@ -284,3 +287,12 @@ untranslated_values:
trace.view.tags: true trace.view.tags: true
user.account.public editing.enabled link: true user.account.public editing.enabled link: true
is:
# ({{link}})
site.edit.anon_edits: true
# Creative Commons Attribution-Share Alike 2.0
site.index.license.license_name: true
# http://creativecommons.org/licenses/by-sa/2.0/
site.index.license.license_url: true