feat: show literal text instead of ids + script fixes

This commit is contained in:
Jonathan Rainville 2020-07-07 15:25:20 -04:00 committed by Iuri Matias
parent 6967e0a537
commit 9c637fdd43
13 changed files with 2961 additions and 2654 deletions

View File

@ -43,8 +43,7 @@ qmlFiles.forEach(file => {
replacementId = translationKeys[enTranslationIndex] replacementId = translationKeys[enTranslationIndex]
} else { } else {
// We need to replace all qsTr because we can't mix qsTrId and qsTr // We need to replace all qsTr because we can't mix qsTrId and qsTr
// TODO remove chars that are not alphanumarical replacementId = replaceableText.replace(/[^a-zA-Z\d]/g, '-').toLowerCase();
replacementId = replaceableText.replace(/\s/g, '-').toLowerCase();
} }
quote = match[0][5]; quote = match[0][5];

BIN
ui/i18n/base.qm Normal file

Binary file not shown.

1472
ui/i18n/base.ts Normal file

File diff suppressed because it is too large Load Diff

BIN
ui/i18n/qml_en.qm Normal file

Binary file not shown.

1472
ui/i18n/qml_en.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,8 @@ lupdate_only{
SOURCES = *.qml \ SOURCES = *.qml \
app/*.qml \ app/*.qml \
shared/*.qml \ shared/*.qml \
onboarding/*.qml \
onboarding/Login/*.qml \
app/AppLayouts/*.qml \ app/AppLayouts/*.qml \
app/AppLayouts/Browser/*.qml \ app/AppLayouts/Browser/*.qml \
app/AppLayouts/Chat/*.qml \ app/AppLayouts/Chat/*.qml \
@ -31,8 +33,9 @@ SOURCES = *.qml \
app/AppLayouts/Wallet/data/*.qml \ app/AppLayouts/Wallet/data/*.qml \
} }
TRANSLATIONS = status_en.ts \ TRANSLATIONS += \
status_es.ts i18n/base.ts \
i18n/qml_en.ts
RESOURCES += \ RESOURCES += \
imports/Constants.qml \ imports/Constants.qml \

View File

@ -81,7 +81,7 @@ ModalPopup {
StyledText { StyledText {
//% "At least 6 characters. You will use this password to unlock status on this device & sign transactions." //% "At least 6 characters. You will use this password to unlock status on this device & sign transactions."
text: qsTrId("at-least-6-characters.-you-will-use-this-password-to-unlock-status-on-this-device-&-sign-transactions.") text: qsTrId("at-least-6-characters-you-will-use-this-password-to-unlock-status-on-this-device-sign-transactions.")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: Style.current.xlPadding anchors.rightMargin: Style.current.xlPadding
@ -127,9 +127,11 @@ ModalPopup {
anchors.topMargin: Style.current.padding anchors.topMargin: Style.current.padding
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: Style.current.padding anchors.rightMargin: Style.current.padding
label: loading ?
//% "Logging in..." //% "Logging in..."
qsTrId("logging-in...") :
//% "Create password" //% "Create password"
label: loading ? qsTrId("logging-in...") : qsTrId("create-password") qsTrId("create-password")
disabled: firstPasswordField.text === "" || repeatPasswordField.text === "" || loading disabled: firstPasswordField.text === "" || repeatPasswordField.text === "" || loading

View File

@ -35,7 +35,7 @@ ModalPopup {
StyledText { StyledText {
//% "Enter 12, 15, 18, 21 or 24 words.\nSeperate words by a single space." //% "Enter 12, 15, 18, 21 or 24 words.\nSeperate words by a single space."
text: qsTrId("enter-12,-15,-18,-21-or-24-words.\nseperate-words-by-a-single-space.") text: qsTrId("enter-12--15--18--21-or-24-words--nseperate-words-by-a-single-space-")
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin: 0 anchors.bottomMargin: 0

View File

@ -31,7 +31,7 @@ RowLayout {
//% "Truly private communication" //% "Truly private communication"
title: qsTrId("intro-title1") title: qsTrId("intro-title1")
//% "Chat over a peer-to-peer, encrypted network\n where messages can't be censored or hacked" //% "Chat over a peer-to-peer, encrypted network\n where messages can't be censored or hacked"
description: qsTrId("chat-over-a-peer-to-peer,-encrypted-network\n-where-messages-can't-be-censored-or-hacked") description: qsTrId("chat-over-a-peer-to-peer--encrypted-network-n-where-messages-can-t-be-censored-or-hacked")
isFirst: true isFirst: true
} }
Slide { Slide {
@ -39,14 +39,14 @@ RowLayout {
//% "Secure crypto wallet" //% "Secure crypto wallet"
title: qsTrId("intro-title2") title: qsTrId("intro-title2")
//% "Send and receive digital assets anywhere in the\nworld--no bank account required" //% "Send and receive digital assets anywhere in the\nworld--no bank account required"
description: qsTrId("send-and-receive-digital-assets-anywhere-in-the\nworld--no-bank-account-required") description: qsTrId("send-and-receive-digital-assets-anywhere-in-the-nworld--no-bank-account-required")
} }
Slide { Slide {
image: "img/browser@2x.jpg" image: "img/browser@2x.jpg"
//% "Decentralized apps" //% "Decentralized apps"
title: qsTrId("intro-title3") title: qsTrId("intro-title3")
//% "Explore games, exchanges and social networks\nwhere you alone own your data" //% "Explore games, exchanges and social networks\nwhere you alone own your data"
description: qsTrId("explore-games,-exchanges-and-social-networks\nwhere-you-alone-own-your-data") description: qsTrId("explore-games--exchanges-and-social-networks-nwhere-you-alone-own-your-data")
isLast: true isLast: true
} }
} }

View File

@ -66,7 +66,7 @@ Page {
anchors.topMargin: 40 anchors.topMargin: 40
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
//% "I'm new, generate keys" //% "I'm new, generate keys"
label: qsTrId("i'm-new,-generate-keys") label: qsTrId("im-new,-generate-keys")
} }
StyledButton { StyledButton {

View File

@ -137,7 +137,8 @@ Item {
id: txtPassword id: txtPassword
anchors.top: addressText.bottom anchors.top: addressText.bottom
anchors.topMargin: Style.current.padding * 2 anchors.topMargin: Style.current.padding * 2
placeholderText: "Enter password" //% "Enter password"
placeholderText: qsTrId("enter-password")
textField.echoMode: TextInput.Password textField.echoMode: TextInput.Password
textField.focus: true textField.focus: true
Keys.onReturnPressed: { Keys.onReturnPressed: {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff