fix(l10n): fix strings extraction

- handle `SOURCES` recursively, rather than spelling all the paths out;
most of them were outdated and some still missing
- let the Python script skip existing translations (in case we need to
manually add plurals)
- updated qml_en.ts as a result of these changes

Stats:
```
Updating '../../ui/i18n/qml_en.ts'...
    Found 1703 source text(s) (109 new and 1594 already existing)
    Kept 35 obsolete entries
    Same-text heuristic provided 35 translation(s)
```
This commit is contained in:
Lukáš Tinkl 2022-07-21 16:13:51 +02:00 committed by Iuri Matias
parent 89f42c9fc3
commit 639a70b611
3 changed files with 2763 additions and 595 deletions

View File

@ -15,8 +15,9 @@ def fixupTranslations(enTsFile: str):
for messageNode in messageNodes:
enString = messageNode.find('source').text
trNode = messageNode.find('translation')
trNode.text = enString # add translation
trNode.attrib = {} # remove 'type="unfinished"'
if not trNode.text:
trNode.text = enString # add translation
trNode.attrib = {} # remove 'type="unfinished"'
tsXmlTree.write(enTsFile)

File diff suppressed because it is too large Load Diff

View File

@ -13,41 +13,8 @@ DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
lupdate_only{
SOURCES = *.qml \
app/*.qml \
imports/*.qml \
imports/shared/*.qml \
imports/shared/controls/*.qml \
imports/shared/keycard/*.qml \
imports/shared/panels/*.qml \
imports/shared/popups/*.qml \
imports/shared/status/*.qml \
imports/shared/views/*.qml \
app/AppLayouts/*.qml \
app/AppLayouts/Browser/*.qml \
app/AppLayouts/Chat/*.qml \
app/AppLayouts/Chat/CommunityComponents/*.qml \
app/AppLayouts/Chat/ChatColumn/*.qml \
app/AppLayouts/Chat/ChatColumn/ChatComponents/*.qml \
app/AppLayouts/Chat/ChatColumn/MessageComponents/*.qml \
app/AppLayouts/Chat/ChatColumn/MessageComponents/TransactionComponents/*.qml \
app/AppLayouts/CommunitiesPortalLayout/*.qml \
app/AppLayouts/Chat/ContactsColumn/*.qml \
app/AppLayouts/Chat/components/*.qml \
app/AppLayouts/Node/*.qml \
app/AppLayouts/Profile/*.qml \
app/AppLayouts/Profile/LeftTab/*.qml \
app/AppLayouts/Profile/LeftTab/components/*.qml \
app/AppLayouts/Profile/Sections/*.qml \
app/AppLayouts/Profile/Sections/BrowserModals/*.qml \
app/AppLayouts/Profile/Sections/Contacts/*.qml \
app/AppLayouts/Profile/Sections/Data/*.qml \
app/AppLayouts/Profile/Sections/Ens/*.qml \
app/AppLayouts/Profile/Sections/Privileges/*.qml \
app/AppLayouts/Wallet/*.qml \
app/AppLayouts/Wallet/components/*.qml \
app/AppLayouts/Wallet/components/collectiblesComponents/*.qml \
app/AppLayouts/Wallet/data/Currencies.qml \
SOURCES += $$files("$$PWD/*.qml", true)
SOURCES += $$files("$$PWD/*.js", true)
}
# Other *.ts files will be provided by Lokalise platform