Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_login
Project
Project
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
NJ_login
Commits
dc9712fa
Commit
dc9712fa
authored
Dec 26, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
精简俄语翻译,优化布局
parent
2b2e7247
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
14 deletions
+33
-14
NJ_login.ts
assets/NJ_login/scene/NJ_login.ts
+21
-2
language_NJ_login.ts
assets/NJ_login/script/language_NJ_login.ts
+12
-12
No files found.
assets/NJ_login/scene/NJ_login.ts
View file @
dc9712fa
...
...
@@ -8,7 +8,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
async
onLoadEnd
()
{
this
.
initData
();
this
.
translateLanguageString
()
// 本地化
this
.
localization
();
this
.
initListener
();
}
...
...
@@ -63,7 +64,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
jumpToBundle
(
'
NJ_YouLeChang
'
);
}
translateLanguageString
()
{
localization
()
{
if
(
!
this
.
middleLayer
||
!
this
.
middleLayer
.
getLocalLanguage
)
{
console
.
log
(
"
未检测到中间层,或中间层不支持getLocalLanguage, 使用默认语言
"
)
return
...
...
@@ -77,6 +78,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
this
.
localLanguage
=
localLanguage
;
this
.
translateLanguageString
();
this
.
repositionLaws
();
}
translateLanguageString
()
{
console
.
log
(
`使用语言
${
this
.
localLanguage
}
`
)
// 点击输入手机号
cc
.
find
(
"
Canvas/bg/ui/loginNode/phone/inputPhone
"
).
getComponent
(
cc
.
EditBox
).
placeholder
=
languageString
[
this
.
localLanguage
].
click_input_phone
;
...
...
@@ -128,6 +135,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc
.
find
(
"
Canvas/bg/ui/btnLaw/policy
"
).
getComponent
(
cc
.
RichText
).
string
=
`<color=#fee60a>《
${
languageString
[
this
.
localLanguage
].
law
.
split
(
"
/@/
"
)[
3
]}
》</c>`
;
}
repositionLaws
()
{
// 针对俄语调整协议、声明的位置
if
(
this
.
localLanguage
==
"
ru-ru
"
)
{
cc
.
find
(
"
Canvas/bg/ui/btnLaw/radio
"
).
x
=
-
275.074
;
cc
.
find
(
"
Canvas/bg/ui/btnLaw/check
"
).
x
=
-
283.525
cc
.
find
(
"
Canvas/bg/ui/btnLaw/New Label_1
"
).
x
=
-
254.576
;
cc
.
find
(
"
Canvas/bg/ui/btnLaw/privacy
"
).
x
=
-
138.207
;
cc
.
find
(
"
Canvas/bg/ui/btnLaw/New Label_2
"
).
x
=
77.799
;
cc
.
find
(
"
Canvas/bg/ui/btnLaw/policy
"
).
x
=
86.604
;
}
}
checkPhone
(
phone
)
{
const
test
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
;
if
(
!
test
.
test
(
phone
))
{
...
...
assets/NJ_login/script/language_NJ_login.ts
View file @
dc9712fa
...
...
@@ -25,18 +25,18 @@ export const lang = {
"
check_agreement
"
:
"
Выберите протокол ниже
"
,
"
password_format_error
"
:
"
Пароль состоит из букв, букв и цифр, должен содержать буквы и цифры и должен быть не менее 8 бит
"
,
"
code_error
"
:
"
Пожалуйста, заполните правильный код
"
,
"
send_code
"
:
"
Отправить код
проверки
"
,
"
click_input_phone
"
:
"
Нажмите для ввода номера
телефона
"
,
"
click_input_password
"
:
"
Нажмите для ввода пароля
"
,
"
click_input_new_password
"
:
"
Нажмите для ввода нового пароля
"
,
"
click_input_code
"
:
"
Нажмите для ввода кода проверки
"
,
"
login_right_now
"
:
"
Зарегистрируйтесь прямо
сейчас
"
,
"
reset_and_login
"
:
"
Сброс
ить и войти в систему
"
,
"
register_now
"
:
"
Немедленная регистраци
я
"
,
"
register_and_login
"
:
"
Регистрация и
регистрация
"
,
"
forget_password
"
:
"
Забы
ть
пароль
"
,
"
tryatry
"
:
"
Не хотите регистрироваться? Иди на игровую площадку
...
"
,
"
law
"
:
"
Я прочитал и согласился./@/Политика конфиденциальности пользователей/@/И/@/Условия предоставления услуг
"
,
"
send_code
"
:
"
Отправить код
"
,
"
click_input_phone
"
:
"
Введите номер
телефона
"
,
"
click_input_password
"
:
"
Введите пароль
"
,
"
click_input_new_password
"
:
"
Введите новый пароль
"
,
"
click_input_code
"
:
"
Введите код
"
,
"
login_right_now
"
:
"
Войти
сейчас
"
,
"
reset_and_login
"
:
"
Сброс
и вход
"
,
"
register_now
"
:
"
Зарегистрироватьс
я
"
,
"
register_and_login
"
:
"
Регистрация и
вход
"
,
"
forget_password
"
:
"
Забы
ли
пароль
"
,
"
tryatry
"
:
"
Просто поколесить
...
"
,
"
law
"
:
"
Прочитал и согласен /@/с политикой конфиденциальности/@/и/@/условиями обслуживания
"
,
"
close
"
:
"
Закрыть
"
},
}
...
...
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