Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
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
Administrator
AloqaIM-Android
Commits
185dd93c
Commit
185dd93c
authored
Dec 20, 2018
by
Govind Dixit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update strings and finalise PR
parent
fad79100
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
55 deletions
+47
-55
MainActivity.kt
...src/main/java/chat/rocket/android/main/ui/MainActivity.kt
+42
-44
strings.xml
app/src/main/res/values-hi/strings.xml
+1
-1
strings.xml
app/src/main/res/values-it/strings.xml
+1
-1
strings.xml
app/src/main/res/values-ja/strings.xml
+1
-7
strings.xml
app/src/main/res/values-ru/strings.xml
+1
-1
strings.xml
app/src/main/res/values/strings.xml
+1
-1
No files found.
app/src/main/java/chat/rocket/android/main/ui/MainActivity.kt
View file @
185dd93c
...
...
@@ -44,7 +44,7 @@ import javax.inject.Inject
private
const
val
CURRENT_STATE
=
"current_state"
class
MainActivity
:
AppCompatActivity
(),
MainView
,
HasActivityInjector
,
HasSupportFragmentInjector
{
HasSupportFragmentInjector
{
@Inject
lateinit
var
activityDispatchingAndroidInjector
:
DispatchingAndroidInjector
<
Activity
>
@Inject
...
...
@@ -74,6 +74,7 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
presenter
.
loadEmojis
()
setupToolbar
()
setupNavigationView
()
loadLocale
()
}
override
fun
onSaveInstanceState
(
outState
:
Bundle
?)
{
...
...
@@ -104,13 +105,13 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
override
fun
activityInjector
():
AndroidInjector
<
Activity
>
=
activityDispatchingAndroidInjector
override
fun
supportFragmentInjector
():
AndroidInjector
<
Fragment
>
=
fragmentDispatchingAndroidInjector
fragmentDispatchingAndroidInjector
override
fun
showUserStatus
(
userStatus
:
UserStatus
)
{
headerLayout
.
apply
{
image_user_status
.
setImageDrawable
(
DrawableHelper
.
getUserStatusDrawable
(
userStatus
,
this
.
context
)
DrawableHelper
.
getUserStatusDrawable
(
userStatus
,
this
.
context
)
)
}
}
...
...
@@ -120,7 +121,7 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
with
(
uiModel
)
{
if
(
userStatus
!=
null
)
{
image_user_status
.
setImageDrawable
(
DrawableHelper
.
getUserStatusDrawable
(
userStatus
,
context
)
DrawableHelper
.
getUserStatusDrawable
(
userStatus
,
context
)
)
}
if
(
userDisplayName
!=
null
)
{
...
...
@@ -177,29 +178,29 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
override
fun
alertNotRecommendedVersion
()
{
AlertDialog
.
Builder
(
this
)
.
setMessage
(
getString
(
R
.
string
.
msg_ver_not_recommended
,
BuildConfig
.
RECOMMENDED_SERVER_VERSION
.
setMessage
(
getString
(
R
.
string
.
msg_ver_not_recommended
,
BuildConfig
.
RECOMMENDED_SERVER_VERSION
)
)
)
.
setPositiveButton
(
R
.
string
.
msg_ok
,
null
)
.
create
()
.
show
()
.
setPositiveButton
(
R
.
string
.
msg_ok
,
null
)
.
create
()
.
show
()
}
override
fun
blockAndAlertNotRequiredVersion
()
{
AlertDialog
.
Builder
(
this
)
.
setMessage
(
getString
(
R
.
string
.
msg_ver_not_minimum
,
BuildConfig
.
REQUIRED_SERVER_VERSION
.
setMessage
(
getString
(
R
.
string
.
msg_ver_not_minimum
,
BuildConfig
.
REQUIRED_SERVER_VERSION
)
)
)
.
setOnDismissListener
{
presenter
.
logout
()
}
.
setPositiveButton
(
R
.
string
.
msg_ok
,
null
)
.
create
()
.
show
()
.
setOnDismissListener
{
presenter
.
logout
()
}
.
setPositiveButton
(
R
.
string
.
msg_ok
,
null
)
.
create
()
.
show
()
}
override
fun
invalidateToken
(
token
:
String
)
=
invalidateFirebaseToken
(
token
)
...
...
@@ -215,7 +216,7 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
}
fun
setupNavigationView
()
{
with
(
view_navigation
.
menu
)
{
with
(
view_navigation
.
menu
)
{
clear
()
setupMenu
(
this
)
}
...
...
@@ -234,10 +235,10 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
fun
showLogoutDialog
()
{
val
builder
=
AlertDialog
.
Builder
(
this
)
builder
.
setTitle
(
R
.
string
.
title_are_you_sure
)
.
setPositiveButton
(
R
.
string
.
action_logout
)
{
_
,
_
->
presenter
.
logout
()
}
.
setNegativeButton
(
android
.
R
.
string
.
no
)
{
dialog
,
_
->
dialog
.
cancel
()
}
.
create
()
.
show
()
.
setPositiveButton
(
R
.
string
.
action_logout
)
{
_
,
_
->
presenter
.
logout
()
}
.
setNegativeButton
(
android
.
R
.
string
.
no
)
{
dialog
,
_
->
dialog
.
cancel
()
}
.
create
()
.
show
()
}
fun
setAvatar
(
avatarUrl
:
String
)
{
...
...
@@ -261,36 +262,36 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
progressDialog
=
null
}
fun
changeLanguage
()
{
fun
changeLanguage
()
{
val
languages
=
arrayOf
(
"English"
,
"Hindi"
,
"Japanese"
,
"Russian"
,
"Italian"
)
val
builder
=
AlertDialog
.
Builder
(
this
)
builder
.
setTitle
(
"Choose Language"
)
builder
.
setSingleChoiceItems
(
languages
,-
1
)
{
dialog
,
which
->
if
(
which
==
0
)
{
builder
.
setSingleChoiceItems
(
languages
,
-
1
)
{
dialog
,
which
->
if
(
which
==
0
)
{
setLocale
(
"en"
)
recreate
()
}
else
if
(
which
==
1
)
{
}
else
if
(
which
==
1
)
{
setLocale
(
"hi"
)
recreate
()
}
else
if
(
which
==
2
)
{
}
else
if
(
which
==
2
)
{
setLocale
(
"ja"
)
recreate
()
}
else
if
(
which
==
3
)
{
}
else
if
(
which
==
3
)
{
setLocale
(
"ru"
)
recreate
()
}
else
if
(
which
==
4
)
{
}
else
if
(
which
==
4
)
{
setLocale
(
"it"
)
recreate
()
}
dialog
.
dismiss
()
}
val
mdialog
=
builder
.
create
()
mdialog
.
show
()
val
mdialog
=
builder
.
create
()
mdialog
.
show
()
}
fun
setLocale
(
lang
:
String
)
{
val
locale
=
Locale
(
lang
)
private
fun
setLocale
(
lang
:
String
)
{
val
locale
=
Locale
(
lang
)
Locale
.
setDefault
(
locale
)
val
config
=
Configuration
()
config
.
locale
=
locale
...
...
@@ -301,12 +302,9 @@ class MainActivity : AppCompatActivity(), MainView, HasActivityInjector,
editor
.
apply
()
}
private
fun
loadLocale
(){
val
sharedPreferences
=
getSharedPreferences
(
"settings"
,
Activity
.
MODE_PRIVATE
)
val
language
=
sharedPreferences
.
getString
(
"My_Lang"
,
""
)
private
fun
loadLocale
()
{
val
sharedPreferences
=
getSharedPreferences
(
"Settings"
,
Activity
.
MODE_PRIVATE
)
val
language
=
sharedPreferences
.
getString
(
"My_Lang"
,
""
)
setLocale
(
language
)
}
}
}
\ No newline at end of file
app/src/main/res/values-hi
-rIN
/strings.xml
→
app/src/main/res/values-hi/strings.xml
View file @
185dd93c
...
...
@@ -153,7 +153,7 @@
<string
name=
"msg_delete_message"
>
संदेश को हटाएं
</string>
<string
name=
"msg_delete_description"
>
क्या आप निश्चित रूप से यह संदेश हटाना चाहते हैं
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Rocket.Chat में आपका स्वागत है
</string>
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO Translate --
>
<string
name=
"msg_team_communication"
>
टीम संचार
</string
>
<string
name=
"msg_login_with_email"
>
ई-मेल के साथ लॉगिन करें
</string>
<string
name=
"msg_create_account"
>
खाता बनाएं
</string>
<string
name=
"msg_continue_with_facebook"
><b>
Facebook
</b>
के साथ जारी रखें
</string>
...
...
app/src/main/res/values-it/strings.xml
View file @
185dd93c
...
...
@@ -147,7 +147,7 @@
<string
name=
"msg_send"
>
Inviare
</string>
<string
name=
"msg_sent_attachment"
>
Inviato allegato
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Benvenuto in Rocket.Chat
</string>
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO Translate --
>
<string
name=
"msg_team_communication"
>
Comunicazione del team
</string
>
<string
name=
"msg_login_with_email"
>
Accedi con
<b>
e-mail
</b></string>
<string
name=
"msg_create_account"
>
Crea un utente
</string>
<string
name=
"msg_continue_with_facebook"
>
Continua con
<b>
Facebook
</b></string>
...
...
app/src/main/res/values-ja/strings.xml
View file @
185dd93c
...
...
@@ -166,18 +166,12 @@
<string
name=
"msg_view_more"
>
更に表示
</string>
<string
name=
"msg_view_less"
>
隠す
</string>
<string
name=
"msg_muted_on_this_channel"
>
あなたはこのチャンネルでミュートされています
</string>
<<<<<<
< HEAD
<string
name=
"msg_no_topic"
>
トピックが追加されていない
</string>
<string
name=
"msg_no_announcement"
>
お知らせが追加されていません
</string>
<string
name=
"msg_no_description"
>
説明が追加されていない
</string>
<!-- TODO - Add proper translation -->
=======
<string
name=
"msg_no_topic"
>
No topic added
</string>
<!-- TODO Add translation -->
<string
name=
"msg_no_announcement"
>
No announcement added
</string>
<!-- TODO Add translation -->
<string
name=
"msg_no_description"
>
No description added
</string>
<!-- TODO Add translation -->
<string
name=
"msg_unable_to_update_password"
>
Unable to update password. Error message: %1$s
</string>
<!-- TODO - Add proper translation -->
<string
name=
"msg_password_updated_successfully"
>
Password updated successfully
</string>
<!-- TODO - Add proper translation -->
>>>>>>> 04c07f98e16556040c2bf7c827137a9f918e69c7
<plurals
name=
"msg_reacted_with_"
>
<item
quantity=
"one"
>
%1$s reacted with %2$s
</item>
<!-- TODO - Add proper translation -->
<item
quantity=
"other"
>
%1$s reacted with %2$s
</item>
<!-- TODO - Add proper translation -->
...
...
app/src/main/res/values-ru
-rRU
/strings.xml
→
app/src/main/res/values-ru/strings.xml
View file @
185dd93c
...
...
@@ -150,7 +150,7 @@
<string
name=
"msg_channel_name"
>
Название канала
</string>
<string
name=
"msg_search"
>
Поиск
</string>
<string
name=
"msg_welcome_to_rocket_chat"
>
Rocket.Chat
</string>
<string
name=
"msg_team_communication"
>
Team Communication
</string>
<!-- TODO Translate --
>
<string
name=
"msg_team_communication"
>
Коммуникация Команды
</string
>
<string
name=
"msg_login_with_email"
>
Войти с помощью
<b>
e-mail
</b></string>
<string
name=
"msg_create_account"
>
Создать аккаунт
</string>
<string
name=
"msg_continue_with_facebook"
>
Войти с помощью
<b>
Facebook
</b></string>
...
...
app/src/main/res/values/strings.xml
View file @
185dd93c
...
...
@@ -18,7 +18,7 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string
name=
"title_share_the_app"
>
Share App
</string>
<string
name=
"title_register_username"
>
Register username
</string>
<string
name=
"title_reset_password"
>
Reset password
</string>
<string
name=
"title_sign_up"
>
Sign up
</string>
<string
name=
"title_sign_up"
translatable=
"false"
>
Sign up
</string>
<string
name=
"title_authentication"
>
Authentication
</string>
<string
name=
"title_legal_terms"
>
Legal Terms
</string>
<string
name=
"title_chats"
>
Chats
</string>
...
...
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