i18n: drop es_ES, add tooling

main
Adriaan de Groot 7 years ago
parent ff43752f47
commit 96887e754c

@ -204,10 +204,12 @@ endif()
#
set( _tx_complete ca zh_CN zh_TW hr cs_CZ da fr lt pt_BR pt_PT es tr_TR)
set( _tx_good sq ja pl sk ro it_IT hu he ru id de nl )
set( _tx_ok bg uk ast is ar sv el es_MX gl en_GB es_ES th fi_FI hi
set( _tx_ok bg uk ast is ar sv el es_MX gl en_GB th fi_FI hi
eu nb sr sl sr@latin mr es_PR kn kk et )
set( _tx_bad fr_CH gu lo fa ur uz )
add_subdirectory( lang ) # i18n tools
###
### Calamares application info
###

@ -0,0 +1,24 @@
# === This file is part of Calamares - <https://github.com/calamares> ===
#
# Calamares is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Calamares is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0+
# License-Filename: LICENSE
#
###
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Xml )
add_executable(txload txload.cpp)
target_link_libraries(txload Qt5::Xml)

File diff suppressed because it is too large Load Diff

@ -1,57 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-13 10:28-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Language-Team: Spanish (Spain) (https://www.transifex.com/calamares/teams/20061/es_ES/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es_ES\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/modules/umount/main.py:40
msgid "Unmount file systems."
msgstr ""
#: src/modules/dummypython/main.py:44
msgid "Dummy python job."
msgstr ""
#: src/modules/dummypython/main.py:97
msgid "Dummy python step {}"
msgstr ""
#: src/modules/machineid/main.py:35
msgid "Generate machine-id."
msgstr ""
#: src/modules/packages/main.py:61
#, python-format
msgid "Processing packages (%(count)d / %(total)d)"
msgstr ""
#: src/modules/packages/main.py:63 src/modules/packages/main.py:73
msgid "Install packages."
msgstr ""
#: src/modules/packages/main.py:66
#, python-format
msgid "Installing one package."
msgid_plural "Installing %(num)d packages."
msgstr[0] ""
msgstr[1] ""
#: src/modules/packages/main.py:69
#, python-format
msgid "Removing one package."
msgid_plural "Removing %(num)d packages."
msgstr[0] ""
msgstr[1] ""

@ -0,0 +1,189 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2018, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QCoreApplication>
#include <QDebug>
#include <QFile>
#include <QList>
#include <QDomDocument>
bool load_file(const char* filename, QDomDocument& doc)
{
QFile file(filename);
QString err;
int err_line, err_column;
if (!file.open(QIODevice::ReadOnly))
{
qDebug() << "Could not open" << filename;
return false;
}
QByteArray ba( file.read(1024 * 1024) );
qDebug() << "Read" << ba.length() << "bytes from" << filename;
if (!doc.setContent(ba, &err, &err_line, &err_column)) {
qDebug() << "Could not read" << filename << ':' << err_line << ':' << err_column << ' ' << err;
file.close();
return false;
}
file.close();
return true;
}
QDomElement find_context(QDomDocument& doc, const QString& name)
{
QDomElement top = doc.documentElement();
QDomNode n = top.firstChild();
while (!n.isNull()) {
if (n.isElement()) {
QDomElement e = n.toElement();
if ( ( e.tagName() == "context" ) && ( e.firstChildElement( "name" ).text() == name ) )
return e;
}
n = n.nextSibling();
}
return QDomElement();
}
QDomElement find_message(QDomElement& context, const QString& source)
{
QDomNode n = context.firstChild();
while (!n.isNull()) {
if (n.isElement()) {
QDomElement e = n.toElement();
if ( e.tagName() == "message" )
{
QString msource = e.firstChildElement( "source" ).text();
if ( msource == source )
return e;
}
}
n = n.nextSibling();
}
return QDomElement();
}
bool merge_into(QDomElement& master, QDomElement& sub)
{
QDomNode n = sub.firstChild();
while (!n.isNull()) {
if (n.isElement()) {
QDomElement e = n.toElement();
if ( e.tagName() == "message" )
{
QString source = e.firstChildElement( "source" ).text();
QString translation = e.firstChildElement( "translation" ).text();
QDomElement masterTranslation = find_message( master, source );
if ( masterTranslation.isNull() )
{
qDebug() << "No master translation for" << source;
return false;
}
QString msource = masterTranslation.firstChildElement( "source" ).text();
QString mtranslation = masterTranslation.firstChildElement( "translation" ).text();
if ( source != msource )
{
qDebug() << "Mismatch for messages\n" << source << '\n' << msource;
return false;
}
if ( !translation.isEmpty() && ( translation != mtranslation ) )
{
qDebug() << "\n\n\nSource:" << source << "\nTL1:" << mtranslation << "\nTL2:" << translation;
}
}
}
n = n.nextSibling();
}
return true;
}
bool merge_into(QDomDocument& master, QDomElement& context)
{
QDomElement name = context.firstChildElement( "name" );
if ( name.isNull() )
return false;
QString contextname = name.text();
QDomElement masterContext = find_context( master, contextname );
if ( masterContext.isNull() )
{
qDebug() << "Master document has no context" << contextname;
return false;
}
return merge_into( masterContext, context );
}
bool merge_into(QDomDocument& master, QDomDocument& sub)
{
QDomElement top = sub.documentElement();
QDomNode n = top.firstChild();
while (!n.isNull()) {
if (n.isElement()) {
QDomElement e = n.toElement();
if ( e.tagName() == "context" )
if ( !merge_into( master, e ) )
return false;
}
n = n.nextSibling();
}
return true;
}
int main(int argc, char** argv)
{
QCoreApplication a(argc, argv);
if (argc < 2)
return 1;
QDomDocument doc("master");
if ( !load_file(argv[1], doc) )
return 1;
for (int i = 2; i < argc; ++i)
{
QDomDocument subdoc("sub");
if ( !load_file(argv[i], subdoc) )
return 1;
if ( !merge_into( doc, subdoc ) )
return 1;
}
QString outfilename( argv[1] );
outfilename.append( ".new" );
QFile outfile(outfilename);
if (!outfile.open(QIODevice::WriteOnly))
{
qDebug() << "Could not open" << outfilename;
return 1;
}
outfile.write( doc.toString(4).toUtf8() );
outfile.close();
return 0;
}

@ -1,42 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-04 08:16-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Language-Team: Spanish (Spain) (https://www.transifex.com/calamares/teams/20061/es_ES/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es_ES\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/modules/dummypythonqt/main.py:84
msgid "Click me!"
msgstr ""
#: src/modules/dummypythonqt/main.py:94
msgid "A new QLabel."
msgstr ""
#: src/modules/dummypythonqt/main.py:97
msgid "Dummy PythonQt ViewStep"
msgstr ""
#: src/modules/dummypythonqt/main.py:183
msgid "The Dummy PythonQt Job"
msgstr ""
#: src/modules/dummypythonqt/main.py:186
msgid "This is the Dummy PythonQt Job. The dummy job says: {}"
msgstr ""
#: src/modules/dummypythonqt/main.py:190
msgid "A status message for Dummy PythonQt Job."
msgstr ""
Loading…
Cancel
Save