Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a devscript

  • Loading branch information...
commit 0c5053dd8e90d3c9e8521777562d9d69b875b359 1 parent b5860db
Steven Haryanto (on Asus Zenbook) authored
Showing with 35 additions and 0 deletions.
  1. +35 −0 devscripts/list-missing-translations
View
35 devscripts/list-missing-translations
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+
+use 5.010;
+use strict;
+use warnings;
+use FindBin '$Bin';
+
+#use Tie::IxHash;
+use String::Escape qw(backslash);
+
+die "Usage: $0 <lang1> <lang2>\n" unless @ARGV == 2;
+my ($lang1, $lang2) = @ARGV;
+
+require "$Bin/../lib/Data/Sah/Lang/$lang1.pm";
+require "$Bin/../lib/Data/Sah/Lang/$lang2.pm";
+
+my ($xlt1, $xlt2);
+{
+ no strict 'refs';
+ $xlt1 = \%{"Data::Sah::Lang::$lang1\::translations"};
+ $xlt2 = \%{"Data::Sah::Lang::$lang2\::translations"};
+}
+
+my @kxlt1 = keys %$xlt1;
+my @kxlt2 = keys %$xlt2;
+
+say "Translations in $lang1 not found in $lang2:";
+my $found;
+for (@kxlt1) {
+ next if $_ ~~ @kxlt2;
+ $found++;
+ say "q[", backslash($_), "]";
+}
+
+exit $found ? 1:0;
Please sign in to comment.
Something went wrong with that request. Please try again.