Added Bosnian, Croatian, Serbian alphabets for labels.
--HG-- branch : develop
|
@ -74,12 +74,14 @@ FRENCH_ALPHABET = set(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY
|
|||
HAKASS_ALPHABET = set(u'абвгғдеёжзиiйклмнңoӧпрстуӱфхцчӌшщъыьэюяАБВГҒДЕЁЖЗИIЙКЛМНҢOӦПРСТУӰФХЦЧӋШЩЪЫЬЭЮЯ') #HAKASS ALPHABET
|
||||
HANTY_ALPHABET = set(u'аӓӑбвгдеёәӛжзийкқлӆмнңн̆оӧөӫпрстуӱўфхҳцчҷшщъыьэєє̈юю̆яя̆АӒӐБВГДЕЁӘӚЖЗИЙКҚЛӅМНҢН̆ОӦӨӪПРСТУӰЎФХҲЦЧҶШЩЪЫЬЭЄЄ̈ЮЮ̆ЯЯ̆') #HANTY ALPHABET
|
||||
CROATIAN_ALPHABET = set(u'abcčćddžðefghijklljmnnjoprsštuvzžABCČĆDDžÐEFGHIJKLLjMNNjOPRSŠTUVZŽ') #CROATIAN ALPHABET
|
||||
BOSNIAN_ALPHABET = set(u'abcčćddžðefghijklljmnnjoprsštuvzžABCČĆDDžÐEFGHIJKLLjMNNjOPRSŠTUVZŽ') #BOSNIAN ALPHABET
|
||||
CZECH_ALPHABET = set(u'aábcčdďeéěfghchiíjklmnňoópqrřsštťuúůvwxyýzžAÁBCČDĎEÉĚFGHChIÍJKLMNŇOÓPQRŘSŠTŤUÚŮVWXYÝZŽ') #CZECH ALPHABET
|
||||
CHUVASH_ALPHABET = set(u'аăбвгдеёĕжзийклмнопрсçтуӳфхцчшщьыъэюяАĂБВГДЕЁĔЖЗИЙКЛМНОПРСÇТУӲФХЦЧШЩЬЫЪЭЮЯ') #CHUVASH ALPHABET
|
||||
SWEDISH_ALPHABET = set(u'aåäbcdefghijklmnoöpqrstuvwxyzAÅÄBCDEFGHIJKLMNOÖPQRSTUVWXYZ') #SWEDISH ALPHABET
|
||||
ESPERANTO_ALPHABET = set(u'abcĉdefgĝhĥijĵklmnoprsŝtuŭvzABCĈDEFGĜHĤIJĴKLMNOPRSŜTUŬVZ') #ESPERANTO ALPHABET
|
||||
ESTONIAN_ALPHABET = set(u'abcdefghijklmnopqrsšzžtuvwõäöüxyABCDEFGHIJKLMNOPQRSŠZŽTUVWÕÄÖÜXY') #ESTONIAN ALPHABET
|
||||
YAKUTIAN_ALPHABET = set(u'абвгҕддьеёжзийклмнҥньоөпрсһтуүфхцчшщъыьэАБВГҔДДьЕЁЖЗИЙКЛМНҤНьОӨПРСҺТУҮФХЦЧШЩЪЫЬЭ') #YAKUTIAN ALPHABET
|
||||
MONTENEGRIN_ALPHABET = set(u'abcčćddžðefghijklljmnnjoprsštuvzžABCČĆDDžÐEFGHIJKLLjMNNjOPRSŠTUVZŽ') #MONTENEGRIN ALPHABET
|
||||
|
||||
UTF8Writer = codecs.getwriter('utf8')
|
||||
sys.stdout = UTF8Writer(sys.stdout)
|
||||
|
@ -91,7 +93,7 @@ DANISH_ALPHABET, INDONESIAN_ALPHABET, IRISH_ALPHABET, ICELANDIC_ALPHABET, SPANIS
|
|||
CATALAN_ALPHABET, KYRGYZ_ALPHABET, LATIN_ALPHABET, LATVIAN_ALPHABET, LITHUANIAN_ALPHABET, MACEDONIAN_ALPHABET, MALTESE_ALPHABET, MARI_ALPHABET, MOLDAVIAN_ALPHABET, MONGOLIAN_ALPHABET,
|
||||
GERMAN_ALPHABET, NORWEGIAN_ALPHABET, OSETIAN_ALPHABET, POLISH_ALPHABET, PORTUGUESE_ALPHABET, ROMANIAN_ALPHABET, SERBIAN_ALPHABET, SLOVAK_ALPHABET, SLOVENIAN_ALPHABET, TAJIK_ALPHABET, TATAR_ALPHABET,
|
||||
TUVIN_ALPHABET, TURKISH_ALPHABET, UDMURT_ALPHABET, UZBEK_ALPHABET, UKRAINIAN_ALPHABET, FARSI_ALPHABET, PHILIPPINES_ALPHABET, FINNISH_ALPHABET, FRENCH_ALPHABET, HAKASS_ALPHABET,HANTY_ALPHABET,
|
||||
CROATIAN_ALPHABET, CZECH_ALPHABET, CHUVASH_ALPHABET, SWEDISH_ALPHABET, ESPERANTO_ALPHABET, ESTONIAN_ALPHABET, YAKUTIAN_ALPHABET)
|
||||
BOSNIAN_ALPHABET, CROATIAN_ALPHABET, CZECH_ALPHABET, CHUVASH_ALPHABET, SWEDISH_ALPHABET, ESPERANTO_ALPHABET, ESTONIAN_ALPHABET, YAKUTIAN_ALPHABET, MONTENEGRIN_ALPHABET)
|
||||
|
||||
L = list(SYMBOLS)
|
||||
print ''.join(L)
|
||||
|
|
|
@ -78,14 +78,14 @@ OTHER_FILES += \
|
|||
share/resources/icon/64x64/icon64x64.ico
|
||||
|
||||
TRANSLATIONS += share/translations/valentina.ts \
|
||||
share/translations/valentina_ru.ts \
|
||||
share/translations/valentina_uk.ts \
|
||||
share/translations/valentina_de.ts \
|
||||
share/translations/valentina_cs.ts \
|
||||
share/translations/valentina_ru_RU.ts \
|
||||
share/translations/valentina_uk_UA.ts \
|
||||
share/translations/valentina_de_DE.ts \
|
||||
share/translations/valentina_cs_CZ.ts \
|
||||
share/translations/valentina_he_IL.ts \
|
||||
share/translations/valentina_fr.ts \
|
||||
share/translations/valentina_it.ts \
|
||||
share/translations/valentina_nl.ts
|
||||
share/translations/valentina_fr_FR.ts \
|
||||
share/translations/valentina_it_IT.ts \
|
||||
share/translations/valentina_nl_NL.ts
|
||||
|
||||
unix {
|
||||
*-g++{
|
||||
|
|
|
@ -166,9 +166,7 @@ QGroupBox *ConfigurationPage::LangGroup()
|
|||
langCombo = new QComboBox;
|
||||
|
||||
// format systems language
|
||||
QString defaultLocale = QLocale::system().name(); // e.g. "de_DE"
|
||||
defaultLocale.truncate(defaultLocale.lastIndexOf('_')); // e.g. "de"
|
||||
QString checkedLocale = settings->value("configuration/locale", defaultLocale).toString();
|
||||
QString checkedLocale = settings->value("configuration/locale", QLocale::system().name()).toString();
|
||||
|
||||
QString m_langPath = qApp->translationsPath();
|
||||
QDir dir(m_langPath);
|
||||
|
@ -178,19 +176,21 @@ QGroupBox *ConfigurationPage::LangGroup()
|
|||
{
|
||||
// get locale extracted by filename
|
||||
QString locale;
|
||||
locale = fileNames.at(i); // "valentina_de.qm"
|
||||
locale.truncate(locale.lastIndexOf('.')); // "valentina_de"
|
||||
locale.remove(0, locale.indexOf('_') + 1); // "de"
|
||||
locale = fileNames.at(i); // "valentina_de_De.qm"
|
||||
locale.truncate(locale.lastIndexOf('.')); // "valentina_de_De"
|
||||
locale.remove(0, locale.indexOf('_') + 1); // "de_De"
|
||||
|
||||
QString lang = QLocale(locale).nativeLanguageName();
|
||||
QIcon ico(QString("%1/%2.png").arg("://icon/flags").arg(locale));
|
||||
QLocale loc = QLocale(locale);
|
||||
QString lang = loc.nativeLanguageName();
|
||||
QIcon ico(QString("%1/%2.png").arg("://icon/flags").arg(QLocale::countryToString(loc.country())));
|
||||
|
||||
langCombo->addItem(ico, lang, locale);
|
||||
}
|
||||
|
||||
QIcon ico(QString("%1/%2.png").arg("://icon/flags").arg("en"));
|
||||
QString lang = QLocale("en").nativeLanguageName();
|
||||
langCombo->addItem(ico, lang, "en");
|
||||
// English language is internal and doens't have own *.qm file.
|
||||
QIcon ico(QString("%1/%2.png").arg("://icon/flags").arg(QLocale::countryToString(QLocale::UnitedStates)));
|
||||
QString lang = QLocale("en_US").nativeLanguageName();
|
||||
langCombo->addItem(ico, lang, "en_US");
|
||||
|
||||
// set default translators and language checked
|
||||
qint32 index = langCombo->findData(checkedLocale);
|
||||
|
@ -244,10 +244,10 @@ QGroupBox *ConfigurationPage::LangGroup()
|
|||
QLabel *labelName = new QLabel(tr("Label language"));
|
||||
labelCombo = new QComboBox;
|
||||
|
||||
QString checkedLabelLocale = settings->value("configuration/label_language", defaultLocale).toString();
|
||||
QString checkedLabelLocale = settings->value("configuration/label_language",
|
||||
QLocale::system().bcp47Name()).toString();
|
||||
|
||||
QStringList list{"de", "en" , "fr" , "ru" , "uk"};
|
||||
SetLabelComboBox(list);
|
||||
SetLabelComboBox(VApplication::LabelLanguages());
|
||||
|
||||
index = labelCombo->findData(checkedLabelLocale);
|
||||
if (index != -1)
|
||||
|
@ -278,8 +278,7 @@ void ConfigurationPage::SetLabelComboBox(const QStringList &list)
|
|||
{
|
||||
for (int i = 0; i < list.size(); ++i)
|
||||
{
|
||||
QString lang = QLocale(list.at(i)).nativeLanguageName();
|
||||
QIcon ico(QString("%1/%2.png").arg("://icon/flags").arg(list.at(i)));
|
||||
labelCombo->addItem(ico, lang, list.at(i));
|
||||
QLocale loc = QLocale(list.at(i));
|
||||
labelCombo->addItem(loc.nativeLanguageName(), list.at(i));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <QMessageBox>
|
||||
#include <QThread>
|
||||
#include <QCommandLineParser>
|
||||
#include <QLibraryInfo>
|
||||
#include "tablewindow.h"
|
||||
#include "version.h"
|
||||
|
||||
|
@ -145,9 +146,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
app.OpenSettings();
|
||||
|
||||
QString defaultLocale = QLocale::system().name(); // e.g. "de_DE"
|
||||
defaultLocale.truncate(defaultLocale.lastIndexOf('_')); // e.g. "de"
|
||||
QString checkedLocale = qApp->getSettings()->value("configuration/locale", defaultLocale).toString();
|
||||
QString checkedLocale = qApp->getSettings()->value("configuration/locale", QLocale::system().name()).toString();
|
||||
|
||||
QTranslator qtTranslator;
|
||||
qtTranslator.load("qt_" + checkedLocale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
|
|
|
@ -34,17 +34,17 @@
|
|||
<file>icon/32x32/arc_cut.png</file>
|
||||
<file>icon/config.png</file>
|
||||
<file>icon/pattern_config.png</file>
|
||||
<file>icon/flags/cs.png</file>
|
||||
<file>icon/flags/de.png</file>
|
||||
<file>icon/flags/en.png</file>
|
||||
<file>icon/flags/fr.png</file>
|
||||
<file>icon/flags/he_IL.png</file>
|
||||
<file>icon/flags/ru.png</file>
|
||||
<file>icon/flags/uk.png</file>
|
||||
<file>icon/flags/CzechRepublic.png</file>
|
||||
<file>icon/flags/Germany.png</file>
|
||||
<file>icon/flags/UnitedStates.png</file>
|
||||
<file>icon/flags/France.png</file>
|
||||
<file>icon/flags/Israel.png</file>
|
||||
<file>icon/flags/Russia.png</file>
|
||||
<file>icon/flags/Ukraine.png</file>
|
||||
<file>icon/Graduation.png</file>
|
||||
<file>icon/individual.png</file>
|
||||
<file>icon/flags/nl.png</file>
|
||||
<file>icon/flags/it.png</file>
|
||||
<file>icon/flags/Netherlands.png</file>
|
||||
<file>icon/flags/Italy.png</file>
|
||||
<file>icon/community_config.png</file>
|
||||
<file>icon/32x32/arrowLeft.png</file>
|
||||
<file>icon/32x32/arrowRight.png</file>
|
||||
|
|
Before Width: | Height: | Size: 818 B After Width: | Height: | Size: 818 B |
Before Width: | Height: | Size: 851 B After Width: | Height: | Size: 851 B |
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 509 B |
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 637 B |
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 520 B |
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 509 B |
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 144 B |
|
@ -2071,3 +2071,18 @@ void VApplication::restoreOverrideCursor(const QString &pixmapPath, int hotX, in
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QStringList VApplication::LabelLanguages()
|
||||
{
|
||||
QStringList list{"de" , // German
|
||||
"en" , // English
|
||||
"fr" , // French
|
||||
"ru" , // Russian
|
||||
"uk" , // Ukrainian
|
||||
"hr" , // Croatian
|
||||
"sr" , // Serbian
|
||||
"bs" // Bosnian
|
||||
};
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -98,6 +98,8 @@ public:
|
|||
|
||||
static void setOverrideCursor(const QString & pixmapPath, int hotX = -1, int hotY = -1);
|
||||
static void restoreOverrideCursor(const QString & pixmapPath, int hotX = -1, int hotY = -1);
|
||||
|
||||
static QStringList LabelLanguages();
|
||||
private:
|
||||
Q_DISABLE_COPY(VApplication)
|
||||
Unit _patternUnit;
|
||||
|
|
|
@ -1623,11 +1623,10 @@ void VPattern::CheckTagExists(const QString &tag)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VPattern::GetLabelBase(unsigned int index) const
|
||||
{
|
||||
QString defaultLocale = QLocale::system().name(); // e.g. "de_DE"
|
||||
defaultLocale.truncate(defaultLocale.lastIndexOf('_')); // e.g. "de"
|
||||
QString checkedLocale = qApp->getSettings()->value("configuration/label_language", defaultLocale).toString();
|
||||
QString checkedLocale = qApp->getSettings()->value("configuration/label_language",
|
||||
QLocale::system().bcp47Name()).toString();
|
||||
|
||||
QStringList list{"de", "en" , "fr" , "ru" , "uk"};
|
||||
QStringList list = VApplication::LabelLanguages();
|
||||
|
||||
QStringList alphabet;
|
||||
switch(list.indexOf(checkedLocale))
|
||||
|
@ -1662,6 +1661,24 @@ QString VPattern::GetLabelBase(unsigned int index) const
|
|||
alphabet = al.split(",");
|
||||
break;
|
||||
}
|
||||
case 5: // hr
|
||||
{
|
||||
QString al = QStringLiteral("A,B,C,Č,Ć,D,Dž,Ð,E,F,G,H,I,J,K,L,Lj,M,N,Nj,O,P,R,S,Š,T,U,V,Z,Ž");
|
||||
alphabet = al.split(",");
|
||||
break;
|
||||
}
|
||||
case 6: // sr
|
||||
{
|
||||
QString al = QStringLiteral("А,Б,В,Г,Д,Ђ,Е,Ж,З,И,Ј,К,Л,Љ,М,Н,Њ,О,П,Р,С,Т,Ћ,У,Ф,Х,Ц,Ч,Џ,Ш");
|
||||
alphabet = al.split(",");
|
||||
break;
|
||||
}
|
||||
case 7: // bs
|
||||
{
|
||||
QString al = QStringLiteral("A,B,C,Č,Ć,D,Dž,Ð,E,F,G,H,I,J,K,L,Lj,M,N,Nj,O,P,R,S,Š,T,U,V,Z,Ž");
|
||||
alphabet = al.split(",");
|
||||
break;
|
||||
}
|
||||
default: // en
|
||||
{
|
||||
QString al = QStringLiteral("A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z");
|
||||
|
|