Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
transfer-engine
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mer-core
transfer-engine
Commits
2c68e586
Commit
2c68e586
authored
Jun 02, 2014
by
Marko Mattila
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21 from zchydem/master
[transfer-engine] Updated example share plugin to use translations.
parents
c8e368b7
ba2b5770
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
11 deletions
+57
-11
example/ExampleShareUI.qml
example/ExampleShareUI.qml
+6
-3
example/example.pro
example/example.pro
+15
-6
example/exampleplugininfo.cpp
example/exampleplugininfo.cpp
+3
-1
example/rpm/example.spec
example/rpm/example.spec
+1
-1
example/translations/example_share_plugin_fi.ts
example/translations/example_share_plugin_fi.ts
+32
-0
No files found.
example/ExampleShareUI.qml
View file @
2c68e586
...
...
@@ -61,7 +61,9 @@ ShareDialog {
Label
{
anchors.centerIn
:
parent
width
:
viewWidth
text
:
"
Example Test Share UI
"
//: Label for example share UI
//% "Example Test Share UI"
text
:
qsTrId
(
"
example-test-share-ui-la-id
"
)
horizontalAlignment
:
Text
.
AlignHCenter
}
}
...
...
@@ -77,8 +79,9 @@ ShareDialog {
}
DialogHeader
{
// TODO: Localization not supported for 3rd party plugins yet
acceptText
:
"
Example Share
"
//: Header for example share plugin
//% "Example Share"
acceptText
:
qsTrId
(
"
example-share-he-id
"
)
}
}
example/example.pro
View file @
2c68e586
...
...
@@ -20,14 +20,12 @@ SOURCES += \
OTHER_FILES
+=
\
ExampleShareUI
.
qml
shareui
.
files
=
*.
qml
shareui
.
path
=
/
usr
/
share
/
nemo
-
transferengine
/
plugins
target
.
path
=
/
usr
/
lib
/
nemo
-
transferengine
/
plugins
INSTALLS
+=
target
shareui
TS_FILE
=
$$
OUT_PWD
/
example_share_plugin
.
ts
EE_QM
=
$$
OUT_PWD
/
example_share_plugin_eng_en
.
qm
...
...
@@ -47,17 +45,28 @@ engineering_english.depends = ts
engineering_english
.
input
=
$$
TS_FILE
engineering_english
.
output
=
$$
EE_QM
engineering_english_install
.
path
=
/
usr
/
share
/
translations
engineering_english_install
.
path
=
/
usr
/
share
/
translations
/
nemotransferengine
engineering_english_install
.
files
=
$$
EE_QM
engineering_english_install
.
CONFIG
+=
no_check_exist
QMAKE_EXTRA_TARGETS
+=
ts
engineering_english
TS_FI_FILE
=
translations
/
example_share_plugin_fi
.
ts
QM_FI_FILE
=
example_share_plugin_fi
.
qm
finnish
.
commands
+=
lrelease
-
idbased
$$
TS_FI_FILE
-
qm
$$
QM_FI_FILE
finnish
.
CONFIG
+=
no_check_exist
no_link
finnish
.
depends
=
ts
finnish
.
input
=
$$
TS_FI_FILE
finnish
.
output
=
$$
QM_FI_FILE
PRE_TARGETDEPS
+=
ts
engineering_english
finnish_install
.
path
=
/
usr
/
share
/
translations
/
nemotransferengine
finnish_install
.
files
=
$$
QM_FI_FILE
finnish_install
.
CONFIG
+=
no_check_exist
INSTALLS
+=
ts_install
engineering_english_install
QMAKE_EXTRA_TARGETS
+=
ts
engineering_english
finnish
PRE_TARGETDEPS
+=
ts
engineering_english
finnish
INSTALLS
+=
ts_install
engineering_english_install
finnish_install
OTHER_FILES
+=
\
rpm
/*
...
...
example/exampleplugininfo.cpp
View file @
2c68e586
...
...
@@ -57,7 +57,9 @@ void ExamplePluginInfo::query()
// TODO: Translations for 3rd party plugins is not yet supported by Sailfish OS.
// Adding support there later, but for now just use what ever non-translated
// string here. This string will be visible in the share method list.
info
.
displayName
=
"Example Display Name"
;
//: Display name for example share plugin
//% "Example plugin"
info
.
displayName
=
qtTrId
(
"example-localization-li-id"
);
// Method ID is a unique identifier for this plugin. It is used to identify which share plugin should be
// used for starting the sharing.
...
...
example/rpm/example.spec
View file @
2c68e586
...
...
@@ -22,7 +22,7 @@ Requires: declarative-transferengine-qt5 >= 0.0.44
%defattr(-,root,root,-)
%{_libdir}/nemo-transferengine/plugins/*shareplugin.so
%{_datadir}/nemo-transferengine/plugins/*.qml
%{_datadir}/translations/
example_share_plugin_eng_en
.qm
%{_datadir}/translations/
nemotransferengine/*
.qm
%package ts-devel
Summary: Translation source for Transfer Engine share plugins
...
...
example/translations/example_share_plugin_fi.ts
0 → 100644
View file @
2c68e586
<
?
xml
version
=
"
1.0
"
encoding
=
"
utf-8
"
?
>
<!
DOCTYPE
TS
>
<
TS
version
=
"
2.0
"
language
=
"
fi_FI
"
>
<
context
>
<
name
><
/name
>
<
message
id
=
"
example-test-share-ui-la-id
"
>
<
location
filename
=
"
ExampleShareUI.qml
"
line
=
"
65
"
/>
<
source
>
Example
Test
Share
UI
<
/source
>
<
translation
>
Esimerkki
testi
UI
<
/translation
>
<
/message
>
<
message
id
=
"
example-share-he-id
"
>
<
location
filename
=
"
ExampleShareUI.qml
"
line
=
"
83
"
/>
<
source
>
Example
Share
<
/source
>
<
extracomment
>
Header
for
example
share
plugin
<
/extracomment
>
<
translation
>
Jakoesimerkki
<
/translation
>
<
/message
>
<
message
id
=
"
example-localization-li-id
"
>
<
location
filename
=
"
exampleplugininfo.cpp
"
line
=
"
62
"
/>
<
source
>
Example
plugin
<
/source
>
<
extracomment
>
Display
name
for
example
share
plugin
<
/extracomment
>
<
translation
>
Esimerkkiplugari
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ExampleUploader
<
/name
>
<
message
>
<
location
filename
=
"
exampleuploader.cpp
"
line
=
"
45
"
/>
<
source
>
Example
<
/source
>
<
translation
>
Esimerkki
<
/translation
>
<
/message
>
<
/context
>
<
/TS
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment