Skip to content

Commit d70f95b

Browse files
sync: from linuxdeepin/dde-session-shell
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#44
1 parent 9bfe3b0 commit d70f95b

File tree

6 files changed

+47
-19
lines changed

6 files changed

+47
-19
lines changed

plugins/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ if (DISABLE_DSS_SNIPE)
44
endif()
55
# add_subdirectory(examples)
66
# add_subdirectory(assist_login)
7-
# add_subdirectory("login-gesture")

plugins/login-gesture/translations/login-gesture_fi.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
</message>
88
<message>
99
<source>For first time use, please set the gesture password first</source>
10-
<translation>Kun käytät ensimmäistä kertaa, aseta ensin ele salasanaksi</translation>
10+
<translation>Kun käytät ensimmäistä kertaa, aseta ensin ele</translation>
1111
</message>
1212
<message>
1313
<source>Set gesture password</source>
14-
<translation>Aseta ele salasanaksi</translation>
14+
<translation>Aseta ele</translation>
1515
</message>
1616
<message>
1717
<source>Please draw a gesture password</source>
@@ -47,7 +47,7 @@
4747
</message>
4848
<message>
4949
<source>Device is locked, unlocked after %1 minutes</source>
50-
<translation type="unfinished"/>
50+
<translation>Tietokone on lukittu, avataan %1 minuutin kuluttua</translation>
5151
</message>
5252
<message>
5353
<source>Modify gesture password</source>
@@ -63,27 +63,27 @@
6363
</message>
6464
<message>
6565
<source>Drawing error, Contact the administrator to reset</source>
66-
<translation type="unfinished"/>
66+
<translation>Piirtovirhe, ota yhteyttä järjestelmänvalvojaan nollaamista varten.</translation>
6767
</message>
6868
<message>
6969
<source>Cancel</source>
70-
<translation type="unfinished"/>
70+
<translation>Peruuta</translation>
7171
</message>
7272
<message>
7373
<source>Ok</source>
74-
<translation type="unfinished"/>
74+
<translation>OK</translation>
7575
</message>
7676
<message>
7777
<source>Drawing error, %1 chances left. Contact the administrator to reset</source>
78-
<translation type="unfinished"/>
78+
<translation>Piirtovirhe, %1 yritystä jäljellä. Ota yhteyttä järjestelmänvalvojaan nollaamista varten.</translation>
7979
</message>
8080
<message>
8181
<source>Setup completed Start unlock</source>
82-
<translation type="unfinished"/>
82+
<translation>Asennus valmis, aloita lukituksen avaaminen</translation>
8383
</message>
8484
<message>
8585
<source>Unlock with gesture password</source>
86-
<translation type="unfinished"/>
86+
<translation>Avaa lukitus eleellä</translation>
8787
</message>
8888
<message>
8989
<source>Minimum 4 points, please redraw</source>

plugins/login-gesture/translations/login-gesture_pl.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</message>
4848
<message>
4949
<source>Device is locked, unlocked after %1 minutes</source>
50-
<translation type="unfinished"/>
50+
<translation>Urządzenie zablokowane, odblokowanie za %1 minut</translation>
5151
</message>
5252
<message>
5353
<source>Modify gesture password</source>
@@ -63,35 +63,35 @@
6363
</message>
6464
<message>
6565
<source>Drawing error, Contact the administrator to reset</source>
66-
<translation type="unfinished"/>
66+
<translation>Błąd rysowania, skontaktuj się z administratorem, aby zresetować hasło</translation>
6767
</message>
6868
<message>
6969
<source>Cancel</source>
70-
<translation type="unfinished"/>
70+
<translation>Anuluj</translation>
7171
</message>
7272
<message>
7373
<source>Ok</source>
74-
<translation type="unfinished"/>
74+
<translation>Ok</translation>
7575
</message>
7676
<message>
7777
<source>Drawing error, %1 chances left. Contact the administrator to reset</source>
78-
<translation type="unfinished"/>
78+
<translation>Błąd rysowania, pozostały %1 próby. Skontaktuj się z administratorem, aby zresetować hasło</translation>
7979
</message>
8080
<message>
8181
<source>Setup completed Start unlock</source>
82-
<translation type="unfinished"/>
82+
<translation>Konfiguracja zakończona, przejdź do logowania</translation>
8383
</message>
8484
<message>
8585
<source>Unlock with gesture password</source>
86-
<translation type="unfinished"/>
86+
<translation>Odblokuj za pomocą wzoru hasła</translation>
8787
</message>
8888
<message>
8989
<source>Minimum 4 points, please redraw</source>
90-
<translation type="unfinished"/>
90+
<translation>Co najmniej 4 punkty, narysuj ponownie.</translation>
9191
</message>
9292
<message>
9393
<source>Contact the administrator to reset</source>
94-
<translation type="unfinished"/>
94+
<translation>Skontaktuj się z administratorem, aby zresetować hasło</translation>
9595
</message>
9696
</context>
9797
</TS>

src/dde-lock/lockframe.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,12 @@ bool LockFrame::event(QEvent *event)
171171
}
172172

173173
if (keyValue != "") {
174+
#ifdef ENABLE_DSS_SNIPE
175+
// v25 dde-daemon接受小驼峰命名的name
176+
emit sendKeyValue(qtifyName(keyValue));
177+
#else
174178
emit sendKeyValue(keyValue);
179+
#endif
175180
}
176181
}
177182
return FullScreenBackground::event(event);

src/global_util/public_func.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,3 +356,21 @@ bool isSleepLock()
356356
return value.toBool();
357357
}
358358
#endif
359+
360+
QString qtifyName(const QString &name) {
361+
bool next_cap = false;
362+
QString result;
363+
364+
for (auto it = name.cbegin(); it != name.cend(); ++it) {
365+
if (*it == '-') {
366+
next_cap = true;
367+
} else if (next_cap) {
368+
result.append(it->toUpper());
369+
next_cap = false;
370+
} else {
371+
result.append(*it);
372+
}
373+
}
374+
375+
return result;
376+
}

src/global_util/public_func.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,10 @@ void configWebEngine();
8282
bool isSleepLock();
8383
#endif
8484

85+
/**
86+
* @brief convert 'some-key' to 'someKey'.
87+
*/
88+
89+
QString qtifyName(const QString &name);
90+
8591
#endif // PUBLIC_FUNC_H

0 commit comments

Comments
 (0)