pidgin/purple-plugin-pack

Clean up translations

4 months ago, Gary Kramlich
c47103c5b7c6
Parents 053e271c66c9
Children 3fae9e3d6b55
Clean up translations

Update the way we handle translations

Update the po's after fixing some errors in de.po

Testing Done:
Just ran `ninja plugin_pack-pot` and `ninja plugin_pack-update-po` until I didn't have any more errors :)

Reviewed at https://reviews.imfreedom.org/r/30/
  • +0 -1
    meson.build
  • +5 -0
    po/LINGUAS
  • +65 -0
    po/POTFILES
  • +0 -108
    po/POTFILES.in
  • +0 -1
    po/POTFILES.skip
  • +0 -380
    po/check_po.pl
  • +2627 -2764
    po/de.po
  • +800 -2329
    po/en_AU.po
  • +936 -2374
    po/es_ES.po
  • +1490 -2483
    po/fr.po
  • +1 -1
    po/meson.build
  • +0 -100
    po/stats.pl
  • +1568 -2482
    po/vi.po
  • --- a/meson.build Tue Jul 14 20:19:39 2020 -0500
    +++ b/meson.build Tue Jul 14 20:56:52 2020 -0500
    @@ -18,7 +18,6 @@
    GETTEXT_PACKAGE = 'plugin_pack'
    conf.set_quoted('GETTEXT_PACKAGE', GETTEXT_PACKAGE)
    -ALL_LINGUAS = 'de en_AU es_ES fr vi'.split()
    #######################################################################
    # Look for the C compiler
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/po/LINGUAS Tue Jul 14 20:56:52 2020 -0500
    @@ -0,0 +1,5 @@
    +de
    +en_AU
    +es_ES
    +fr
    +vi
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/po/POTFILES Tue Jul 14 20:56:52 2020 -0500
    @@ -0,0 +1,65 @@
    +album/album.c
    +album/album-ui.c
    +bash/bash.c
    +blistops/blistops.c
    +capsnot/capsnot.c
    +colorize/colorize.c
    +common/gtk_template.c
    +common/purple_template.c
    +convbadger/convbadger.c
    +dewysiwygification/dewysiwygification.c
    +dice/dice.c
    +difftopic/difftopic.c
    +eight_ball/eight_ball.c
    +enhancedhist/enhancedhist.c
    +flip/flip.c
    +google/google.c
    +gRIM/gRIM.c
    +groupmsg/groupmsg.c
    +highlight/highlight.c
    +icon-override/icon_override.c
    +irchelper/irchelper.c
    +irc-more/irc-more.c
    +irssi/datechange.c
    +irssi/irssi.c
    +irssi/lastlog.c
    +irssi/layout.c
    +irssi/window.c
    +lastseen/lastseen.c
    +listhandler/aim_blt_files.c
    +listhandler/alias_xml_files.c
    +listhandler/alias_xml_files.c
    +listhandler/gen_xml_files.c
    +listhandler/listhandler.c
    +listhandler/migrate.c
    +listhandler/purple_blist_xml.c
    +listhandler/purple_blist_xml.c
    +listlog/listlog.c
    +mystatusbox/mystatusbox.c
    +nicksaid/nicksaid.c
    +ning/ning.c
    +ning/ning_connection.c
    +okcupid/okc_blist.c
    +okcupid/okc_connection.c
    +okcupid/okc_messages.c
    +okcupid/okcupid.c
    +oldlogger/oldlogger.c
    +omegle/om_connection.c
    +omegle/omegle.c
    +plonkers/plonkers.c
    +schedule/pidgin-schedule.c
    +schedule/schedule.c
    +sepandtab/sepandtab.c
    +showoffline/showoffline.c
    +simfix/simfix.c
    +slashexec/slashexec.c
    +snpp/snpp.c
    +splitter/splitter.c
    +sslinfo/sslinfo.c
    +switchspell/switchspell.c
    +timelog/log-widget.c
    +timelog/range-widget.c
    +timelog/timelog.c
    +timelog/timelog.h
    +translate/translate.c
    +xmppprio/xmppprio.c
    --- a/po/POTFILES.in Tue Jul 14 20:19:39 2020 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,108 +0,0 @@
    -album/album.c
    -album/album-ui.c
    -autoprofile/autoaway.c
    -autoprofile/autoprofile.c
    -autoprofile/autoreply.c
    -autoprofile/comp_countdownup.c
    -autoprofile/comp_executable.c
    -autoprofile/comp_http.c
    -autoprofile/comp_logstats.c
    -autoprofile/comp_logstats_gtk.c
    -autoprofile/comp_quotation.c
    -autoprofile/comp_rss.c
    -autoprofile/comp_textfile.c
    -autoprofile/comp_timestamp.c
    -autoprofile/comp_uptime.c
    -autoprofile/gtk_actions.c
    -autoprofile/gtk_away_msgs.c
    -autoprofile/gtk_widget.c
    -autoprofile/preferences.c
    -autoreply/autoreply.c
    -awaynotify/awaynotify.c
    -bash/bash.c
    -bit/bit.c
    -blistops/blistops.c
    -buddytime/buddytime.c
    -buddytime/gtkbuddytime.c
    -capsnot/capsnot.c
    -chronic/chronic.c
    -colorize/colorize.c
    -common/gtk_template.c
    -common/purple_template.c
    -convbadger/convbadger.c
    -dewysiwygification/dewysiwygification.c
    -dice/dice.c
    -difftopic/difftopic.c
    -eight_ball/eight_ball.c
    -enhancedhist/enhancedhist.c
    -findip/findip.c
    -findip/findip.c
    -flip/flip.c
    -google/google.c
    -gRIM/gRIM.c
    -groupmsg/groupmsg.c
    -hideconv/hideconv.c
    -highlight/highlight.c
    -icon-override/icon_override.c
    -ignorance/ignorance.c
    -ignorance/interface.c
    -ignorance/support.c
    -ignore/ignore.c
    -infopane/infopane.c
    -infopane/infopane.c
    -irchelper/irchelper.c
    -irc-more/irc-more.c
    -irssi/datechange.c
    -irssi/irssi.c
    -irssi/lastlog.c
    -irssi/layout.c
    -irssi/window.c
    -lastseen/lastseen.c
    -listhandler/aim_blt_files.c
    -listhandler/alias_xml_files.c
    -listhandler/alias_xml_files.c
    -listhandler/gen_xml_files.c
    -listhandler/listhandler.c
    -listhandler/migrate.c
    -listhandler/purple_blist_xml.c
    -listhandler/purple_blist_xml.c
    -listlog/listlog.c
    -msglen/msglen.c
    -mystatusbox/mystatusbox.c
    -napster/napster.c
    -nicksaid/nicksaid.c
    -ning/ning.c
    -ning/ning_connection.c
    -nomobility/nomobility.c
    -okcupid/okc_blist.c
    -okcupid/okc_connection.c
    -okcupid/okc_messages.c
    -okcupid/okcupid.c
    -oldlogger/oldlogger.c
    -omegle/om_connection.c
    -omegle/omegle.c
    -plonkers/plonkers.c
    -schedule/pidgin-schedule.c
    -schedule/schedule.c
    -sepandtab/sepandtab.c
    -showoffline/showoffline.c
    -simfix/simfix.c
    -slashexec/slashexec.c
    -smartear/gtksmartear.c
    -smartear/smartear.c
    -snpp/snpp.c
    -splitter/splitter.c
    -sslinfo/sslinfo.c
    -stocker/stocker.c
    -stocker/stocker_prefs.c
    -stress/stress.c
    -switchspell/switchspell.c
    -talkfilters/talkfilters.c
    -timelog/log-widget.c
    -timelog/range-widget.c
    -timelog/timelog.c
    -timelog/timelog.h
    -translate/translate.c
    -xchat-chats/xchat-chats.c
    -xchat-chats/xchat-chats.c
    -xmppprio/xmppprio.c
    --- a/po/POTFILES.skip Tue Jul 14 20:19:39 2020 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,1 +0,0 @@
    -plugin_pack.py
    --- a/po/check_po.pl Tue Jul 14 20:19:39 2020 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,380 +0,0 @@
    -#!/usr/bin/perl -w
    -#
    -# check_po.pl - check po file translations for likely errors
    -#
    -# Written by David W. Pfitzner dwp@mso.anu.edu.au
    -# This script is hereby placed in the Public Domain.
    -#
    -# Various checks on po file translations:
    -# - printf-style format strings;
    -# - differences in trailing newlines;
    -# - empty (non-fuzzy) msgid;
    -# - likely whitespace errors on joining multi-line entries
    -# Ignores all fuzzy entries.
    -#
    -# Options:
    -# -x Don't do standard checks above (eg, just check one of below).
    -# -n Check newlines within strings; ie, that have equal numbers
    -# of newlines in msgstr and msgid. (Optional because this may
    -# happen legitimately.)
    -# -w Check leading whitespace. Sometimes whitespace is simply
    -# spacing (eg, for widget labels etc), or punctuation differences,
    -# so this may be ok.
    -# -W Check trailing whitespace. See -w above.
    -# -p Check trailing punctuation.
    -# -c Check capitalization of first non-whitespace character
    -# (only if [a-zA-Z]).
    -# -e Check on empty (c.q. new) msgstr
    -#
    -# Reads stdin (or filename args, via <>), writes any problems to stdout.
    -#
    -# Modified by Davide Pagnin nightmare@freeciv.it to support plural forms
    -#
    -# Version: 0.41 (2002-06-06)
    -
    -use strict;
    -use vars qw($opt_c $opt_n $opt_p $opt_w $opt_W $opt_x $opt_e);
    -use Getopt::Std;
    -
    -getopts('cnpwWxe');
    -
    -# Globals, for current po entry:
    -#
    -# Note that msgid and msgstr have newlines represented by the
    -# two characters '\' and 'n' (and similarly for other escapes).
    -
    -my @amsgid; # lines exactly as in input
    -my @amsgstr;
    -my $entryline; # lineno where entry starts
    -my $msgid; # lines joined by ""
    -my $msgstr;
    -my $is_fuzzy;
    -my $is_cformat;
    -my $state; # From constant values below.
    -my $did_print; # Whether we have printed this entry, to
    - # print only once for multiple problems.
    -
    -use constant S_LOOKING_START => 0; # looking for start of entry
    -use constant S_DOING_MSGID => 1; # doing msgid part
    -use constant S_DOING_MSGSTR => 2; # doing msgstr part
    -
    -# Initialize or reinitalize globals to prepare for new entry:
    -sub new_entry {
    - @amsgid = ();
    - @amsgstr = ();
    - $msgid = undef;
    - $msgstr = undef;
    - $entryline = 0;
    - $is_fuzzy = 0;
    - $is_cformat = 0;
    - $did_print = 0;
    - $state = S_LOOKING_START;
    -}
    -
    -# Nicely print either a "msgid" or "msgstr" (name is one of these)
    -# with given array of data.
    -sub print_one {
    - my $name = shift;
    - print " $name \"", join("\"\n \"", @_), "\"\n";
    -}
    -
    -# Print a problem (args like print()), preceeded by entry unless
    -# we have already printed that: label, and msgid and msgstr.
    -#
    -sub print_problem {
    - unless ($did_print) {
    - print "ENTRY:", ($ARGV eq "-" ? "" : " ($ARGV, line $entryline)"), "\n";
    - print_one("msgid", @amsgid);
    - print_one("msgstr", @amsgstr);
    - $did_print = 1;
    - }
    - print "*** ", @_;
    -}
    -
    -# Check final newline: probably, translations should end in a newline
    -# if and only if the original string does.
    -# (See also check_trailing_whitespace and check_num_newlines below.)
    -#
    -sub check_trailing_newlines {
    - if ($opt_x) { return; }
    -
    - my ($ichar, $schar);
    -
    - $ichar = (length($msgid)>=2) ? substr($msgid, -2, 2) : "";
    - $schar = (length($msgstr)>=2) ? substr($msgstr, -2, 2) : "";
    -
    - if ($ichar eq "\\n" && $schar ne "\\n") {
    - print_problem "Missing trailing newline\n";
    - }
    - if ($ichar ne "\\n" && $schar eq "\\n") {
    - print_problem "Extra trailing newline\n";
    - }
    -
    -}
    -
    -# Check leading whitespace. In general, any leading whitespace should
    -# be the same in msgstr and msgid -- but not always.
    -#
    -sub check_leading_whitespace {
    - unless ($opt_w) { return; }
    -
    - my ($id, $str);
    -
    - if ($msgid =~ m/^(\s+)/) {
    - $id = $1;
    - } else {
    - $id = "";
    - }
    - if ($msgstr =~ m/^(\s+)/) {
    - $str = $1;
    - } else {
    - $str = "";
    - }
    - if ($id ne $str) {
    - print_problem "Different leading whitespace\n";
    - }
    -}
    -
    -# Check trailing whitespace. In general, any trailing whitespace should
    -# be the same in msgstr and msgid -- but not always.
    -#
    -sub check_trailing_whitespace {
    - unless ($opt_W) { return; }
    -
    - my ($id, $str);
    -
    - if ($msgid =~ m/((?:\s|\\n)+)$/) {
    - $id = $1;
    - } else {
    - $id = "";
    - }
    - if ($msgstr =~ m/((?:\s|\\n)+)$/) {
    - $str = $1;
    - } else {
    - $str = "";
    - }
    - if ($id ne $str) {
    - print_problem "Different trailing whitespace\n";
    - }
    -}
    -
    -# Check equal numbers of newlines. In general ... etc.
    -#
    -sub check_num_newlines {
    - unless ($opt_n) { return; }
    -
    - my $num_i = ($msgid =~ m(\\n)g);
    - my $num_s = ($msgstr =~ m(\\n)g);
    -
    - if ($num_i != $num_s) {
    - print_problem "Mismatch in newline count\n";
    - }
    -
    -}
    -
    -# Check capitalization of first non-whitespace character (for [a-zA-Z]
    -# only). In general ... etc.
    -#
    -sub check_leading_capitalization {
    - unless ($opt_c) { return; }
    -
    - my ($id, $str);
    -
    - if ($msgid =~ m/^\s*([a-zA-Z])/) {
    - $id = $1;
    - }
    - if ($msgstr =~ m/^\s*([a-zA-Z])/) {
    - $str = $1;
    - }
    - if (defined($id) && defined($str)) {
    - if (($id =~ /^[a-z]$/ && $str =~ /^[A-Z]$/) ||
    - ($id =~ /^[A-Z]$/ && $str =~ /^[a-z]$/)) {
    - print_problem "Different leading capitalization\n";
    - }
    - }
    -}
    -
    -# Check trailing 'punctuation' characters (ignoring trailing whitespace).
    -# In general .. etc.
    -#
    -sub check_trailing_punctuation {
    - unless ($opt_p) { return; }
    -
    - my ($id, $str);