diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-05-05 08:06:20 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-05-05 08:07:32 (GMT) |
commit | 39e992988f21553df7e839f36ced75ca5bf8588c (patch) | |
tree | 9362676768e3c8229f6700103a44cf2b247c423f /demos | |
parent | 1383f287137c50c7e58e7f9395f7a9ffd9441852 (diff) | |
download | Qt-39e992988f21553df7e839f36ced75ca5bf8588c.zip Qt-39e992988f21553df7e839f36ced75ca5bf8588c.tar.gz Qt-39e992988f21553df7e839f36ced75ca5bf8588c.tar.bz2 |
Fix i18n example.
Add french translation to photoviewer demo.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml | 2 | ||||
-rw-r--r-- | demos/declarative/photoviewer/i18n/base.ts | 30 | ||||
-rw-r--r-- | demos/declarative/photoviewer/i18n/qml_fr.qm | bin | 0 -> 268 bytes | |||
-rw-r--r-- | demos/declarative/photoviewer/i18n/qml_fr.ts | 30 | ||||
-rw-r--r-- | demos/declarative/photoviewer/photoviewer.qml | 6 |
5 files changed, 64 insertions, 4 deletions
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml index 142735f..71d3cdc 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml @@ -56,7 +56,7 @@ Component { Tag { anchors { horizontalCenter: parent.horizontalCenter; bottom: parent.bottom; bottomMargin: 10 } - frontLabel: tag; backLabel: "Delete"; flipped: mainWindow.editMode + frontLabel: tag; backLabel: qsTr("Remove"); flipped: mainWindow.editMode onTagChanged: rssModel.tags = tag onBackClicked: if (mainWindow.editMode) photosModel.remove(index); } diff --git a/demos/declarative/photoviewer/i18n/base.ts b/demos/declarative/photoviewer/i18n/base.ts new file mode 100644 index 0000000..1accfd2 --- /dev/null +++ b/demos/declarative/photoviewer/i18n/base.ts @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>AlbumDelegate</name> + <message> + <location filename="../PhotoViewerCore/AlbumDelegate.qml" line="59"/> + <source>Remove</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>photoviewer</name> + <message> + <location filename="../photoviewer.qml" line="30"/> + <source>Add</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../photoviewer.qml" line="39"/> + <source>Edit</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../photoviewer.qml" line="52"/> + <source>Back</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/demos/declarative/photoviewer/i18n/qml_fr.qm b/demos/declarative/photoviewer/i18n/qml_fr.qm Binary files differnew file mode 100644 index 0000000..c24fcbc --- /dev/null +++ b/demos/declarative/photoviewer/i18n/qml_fr.qm diff --git a/demos/declarative/photoviewer/i18n/qml_fr.ts b/demos/declarative/photoviewer/i18n/qml_fr.ts new file mode 100644 index 0000000..9f892db --- /dev/null +++ b/demos/declarative/photoviewer/i18n/qml_fr.ts @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="fr_FR"> +<context> + <name>AlbumDelegate</name> + <message> + <location filename="../PhotoViewerCore/AlbumDelegate.qml" line="59"/> + <source>Remove</source> + <translation>Supprimer</translation> + </message> +</context> +<context> + <name>photoviewer</name> + <message> + <location filename="../photoviewer.qml" line="30"/> + <source>Add</source> + <translation>Ajouter</translation> + </message> + <message> + <location filename="../photoviewer.qml" line="39"/> + <source>Edit</source> + <translation>Éditer</translation> + </message> + <message> + <location filename="../photoviewer.qml" line="52"/> + <source>Back</source> + <translation>Retour</translation> + </message> +</context> +</TS> diff --git a/demos/declarative/photoviewer/photoviewer.qml b/demos/declarative/photoviewer/photoviewer.qml index 4094294..e384f46 100644 --- a/demos/declarative/photoviewer/photoviewer.qml +++ b/demos/declarative/photoviewer/photoviewer.qml @@ -27,7 +27,7 @@ Rectangle { Column { spacing: 20; anchors { bottom: parent.bottom; right: parent.right; rightMargin: 20; bottomMargin: 20 } Button { - id: newButton; label: "New"; rotation: 3 + id: newButton; label: qsTr("Add"); rotation: 3 anchors.horizontalCenter: parent.horizontalCenter onClicked: { mainWindow.editMode = false @@ -36,7 +36,7 @@ Rectangle { } } Button { - id: deleteButton; label: "Delete"; rotation: -2; + id: deleteButton; label: qsTr("Edit"); rotation: -2; onClicked: mainWindow.editMode = !mainWindow.editMode anchors.horizontalCenter: parent.horizontalCenter } @@ -49,7 +49,7 @@ Rectangle { ListView { anchors.fill: parent; model: albumVisualModel.parts.browser; interactive: false } - Button { id: backButton; label: "Back"; rotation: 3; x: parent.width - backButton.width - 6; y: -backButton.height - 8 } + Button { id: backButton; label: qsTr("Back"); rotation: 3; x: parent.width - backButton.width - 6; y: -backButton.height - 8 } Rectangle { id: photosShade; color: 'black'; width: parent.width; height: parent.height; opacity: 0; visible: opacity != 0.0 } |