remove now unused translations

We use proxmox-i18n now and merged those files there already
This commit is contained in:
Thomas Lamprecht 2018-01-23 10:55:18 +01:00 committed by Dominik Csapak
parent 839a53d79a
commit 5e034c9c51
26 changed files with 1 additions and 69594 deletions

View File

@ -4,7 +4,7 @@ export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
DESTDIR=
SUBDIRS = aplinfo PVE bin www po
SUBDIRS = aplinfo PVE bin www
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell cat .git/refs/heads/master)
@ -42,10 +42,6 @@ upload: ${DEB} check
./repoid.pl .git check
tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pve --dist stretch
#.PHONY: poupload
#poupload:
# rsync po/*.po po/pve-manager.pot pve.proxmox.com:/home/ftp/sources/po-files/
.PHONY: install
install: country.dat vzdump.conf vzdump-hook-script.pl pve-apt.conf mtu bridgevlan bridgevlanport vlan vlan-down
install -d -m 0700 -o www-data -g www-data ${DESTDIR}/var/log/pveproxy

View File

@ -15,7 +15,6 @@ DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
PODDIR=${DESTDIR}/usr/share/doc/${PACKAGE}/pod
WWWBASEDIR=${DESTDIR}/usr/share/${PACKAGE}
WWWROOTDIR=${WWWBASEDIR}/root
WWWLOCALEDIR=${WWWBASEDIR}/locale
WWWIMAGEDIR=${WWWBASEDIR}/images
WWWTOUCHDIR=${WWWBASEDIR}/touch
WWWCSSDIR=${WWWBASEDIR}/css

View File

@ -1,27 +0,0 @@
include ../defines.mk
LINGUAS=de it fr ja es sv ru tr zh_CN da ca pl sl nb nn pt_BR eu fa gl hu
all: $(patsubst %, pve-lang-%.js, $(LINGUAS))
.PHONY: update-po
update-po:
./jsgettext.pl ../www/manager6
for i in $(LINGUAS); do echo -n "$$i: ";msgmerge -s -v $$i.po messages.pot >$$i.po.tmp && mv $$i.po.tmp $$i.po; done
# try to generate po files when someone add a new language
.SECONDARY: # do not delete generated intermediate file
%.po:
msginit -i messages.pot -l $*
pve-lang-%.js: %.po
./po2js.pl $< >$@.tmp
mv $@.tmp $@
.PHONY: install
install: $(patsubst %, pve-lang-%.js, $(LINGUAS))
install -d ${WWWLOCALEDIR}
install -m 0644 $^ ${WWWLOCALEDIR}
clean:
rm -rf *~ *.po.tmp *.js.tmp pve-lang-*.js

2925
po/ca.po

File diff suppressed because it is too large Load Diff

3372
po/da.po

File diff suppressed because it is too large Load Diff

3048
po/de.po

File diff suppressed because it is too large Load Diff

3350
po/es.po

File diff suppressed because it is too large Load Diff

3378
po/eu.po

File diff suppressed because it is too large Load Diff

3341
po/fa.po

File diff suppressed because it is too large Load Diff

3342
po/fr.po

File diff suppressed because it is too large Load Diff

3336
po/gl.po

File diff suppressed because it is too large Load Diff

3299
po/hu.po

File diff suppressed because it is too large Load Diff

3262
po/it.po

File diff suppressed because it is too large Load Diff

4182
po/ja.po

File diff suppressed because it is too large Load Diff

View File

@ -1,91 +0,0 @@
#!/usr/bin/perl
use strict;
use Time::Local;
use PVE::Tools;
use Locale::PO;
my $dir = shift;
die "no such directory\n" if ! -d $dir;
my $sources = [];
my $findcmd = [['find', $dir, '-name', '*.js'],['sort']];
PVE::Tools::run_command($findcmd, outfunc => sub {
my $line = shift;
next if $line =~ m|/pvemanagerlib.js$|;
next if $line =~ m|/openvz/|;
push @$sources, $line;
});
my $filename = "messages.pot";
my $header = <<__EOD;
SOME DESCRIPTIVE TITLE.
Copyright (C) 2011-2016 Proxmox Server Solutions GmbH
This file is distributed under the same license as the pve-manager package.
Proxmox Support Team <support\@proxmox.com>, 2016.
__EOD
my $ctime = scalar localtime;
my $href = {};
my $po = new Locale::PO(-msgid=> '',
-comment=> $header,
-fuzzy=> 1,
-msgstr=>
"Project-Id-Version: pve-manager 2.0\n" .
"Report-Msgid-Bugs-To: <support\@proxmox.com>\n" .
"POT-Creation-Date: $ctime\n" .
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" .
"Last-Translator: FULL NAME <EMAIL\@ADDRESS>\n" .
"Language-Team: LANGUAGE <support\@proxmox.com>\n" .
"MIME-Version: 1.0\n" .
"Content-Type: text/plain; charset=CHARSET\n" .
"Content-Transfer-Encoding: 8bit\n");
$href->{''} = $po;
sub extract_msg {
my ($filename, $linenr, $line) = @_;
my $count = 0;
while(1) {
my $text;
if ($line =~ m/\Wgettext\s*\((("((?:[^"\\]++|\\.)*+)")|('((?:[^'\\]++|\\.)*+)'))\)/g) {
$text = $3 || $5;
}
last if !$text;
$count++;
my $ref = "$filename:$linenr";
if (my $po = $href->{$text}) {
$po->reference($po->reference() . " $ref");
} else {
my $po = new Locale::PO(-msgid=> $text, -reference=> $ref, -msgstr=> '');
$href->{$text} = $po;
}
};
die "can't extract gettext message in '$filename' line $linenr\n"
if !$count;
}
foreach my $s (@$sources) {
open(SRC, $s) || die "unable to open file '$s' - $!\n";
while(defined(my $line = <SRC>)) {
if ($line =~ m/gettext/) {
extract_msg($s, $., $line);
}
}
close(SRC);
}
Locale::PO->save_file_fromhash($filename, $href);

File diff suppressed because it is too large Load Diff

3326
po/nb.po

File diff suppressed because it is too large Load Diff

3324
po/nn.po

File diff suppressed because it is too large Load Diff

3372
po/pl.po

File diff suppressed because it is too large Load Diff

View File

@ -1,99 +0,0 @@
#!/usr/bin/perl -w
use strict;
use Locale::PO;
use JSON;
use Encode;
# current limits:
# - we do not support plural. forms
# - no message content support
my $filename = shift || die "no po file specified\n";
# like FNV32a, but we only return 31 bits (positive numbers)
sub fnv31a {
my ($string) = @_;
my $hval = 0x811c9dc5;
foreach my $c (unpack('C*', $string)) {
$hval ^= $c;
$hval += (
(($hval << 1) ) +
(($hval << 4) ) +
(($hval << 7) ) +
(($hval << 8) ) +
(($hval << 24) ) );
$hval = $hval & 0xffffffff;
}
return $hval & 0x7fffffff;
}
my $href = Locale::PO->load_file_ashash($filename);
my $catalog;
my $charset;
my $hpo = $href->{'""'} || die "no header";
my $header = $hpo->dequote($hpo->msgstr);
if ($header =~ m|^Content-Type:\s+text/plain;\s+charset=(\S+)$|im) {
$charset = $1;
} else {
die "unable to get charset\n" if !$charset;
}
foreach my $k (keys %$href) {
my $po = $href->{$k};
next if $po->fuzzy(); # skip fuzzy entries
my $qmsgid = decode($charset, $po->msgid);
my $msgid = $po->dequote($qmsgid);
my $qmsgstr = decode($charset, $po->msgstr);
my $msgstr = $po->dequote($qmsgstr);
next if !length($msgid); # skip header
my $digest = fnv31a($msgid);
die "duplicate digest" if $catalog->{$digest};
$catalog->{$digest} = [ $msgstr ];
# later, we can add plural forms to the array
}
#use Data::Dumper;
#print STDERR Dumper(encode_json({test => decode('UTF-8', "müssen")}));
my $json = to_json($catalog, {canonical => 1, utf8 => 1});
print <<__EOD
// gettext catalog "$filename"
PVE = { i18n_msgcat: $json }
function fnv31a(text) {
var len = text.length;
var hval = 0x811c9dc5;
for (var i = 0; i < len; i++) {
var c = text.charCodeAt(i);
hval ^= c;
hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24);
}
hval &= 0x7fffffff;
return hval;
}
function gettext(buf) {
var digest = fnv31a(buf);
var data = PVE.i18n_msgcat[digest];
if (!data) {
return buf;
}
return data[0] || buf;
}
__EOD

File diff suppressed because it is too large Load Diff

3370
po/ru.po

File diff suppressed because it is too large Load Diff

3355
po/sl.po

File diff suppressed because it is too large Load Diff

3379
po/sv.po

File diff suppressed because it is too large Load Diff

3372
po/tr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff