Fix i18n issue

This commit is contained in:
Benoit Marty
2019-03-13 18:36:57 +01:00
parent 617f71fd51
commit d5838262ea
62 changed files with 39589 additions and 50 deletions

View File

@ -120,7 +120,8 @@ object MatrixPatterns {
* @return true if the string is a valid event id.
*/
fun isEventId(str: String?): Boolean {
return str != null && (PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER.matcher(str).matches() || PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER_V3.matcher(str).matches())
return str != null
&& (PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER.matcher(str).matches() || PATTERN_CONTAIN_MATRIX_EVENT_IDENTIFIER_V3.matcher(str).matches())
}
/**

View File

@ -41,7 +41,10 @@ internal data class PasswordLoginParams(@Json(name = "identifier") val identifie
val IDENTIFIER_KEY_NUMBER = "number"
fun userIdentifier(user: String, password: String, deviceDisplayName: String? = null, deviceId: String? = null): PasswordLoginParams {
fun userIdentifier(user: String,
password: String,
deviceDisplayName: String? = null,
deviceId: String? = null): PasswordLoginParams {
val identifier = HashMap<String, String>()
identifier[IDENTIFIER_KEY_TYPE] = IDENTIFIER_KEY_TYPE_USER
identifier[IDENTIFIER_KEY_USER] = user
@ -49,7 +52,11 @@ internal data class PasswordLoginParams(@Json(name = "identifier") val identifie
}
fun thirdPartyIdentifier(medium: String, address: String, password: String, deviceDisplayName: String? = null, deviceId: String? = null): PasswordLoginParams {
fun thirdPartyIdentifier(medium: String,
address: String,
password: String,
deviceDisplayName: String? = null,
deviceId: String? = null): PasswordLoginParams {
val identifier = HashMap<String, String>()
identifier[IDENTIFIER_KEY_TYPE] = IDENTIFIER_KEY_TYPE_THIRD_PARTY
identifier[IDENTIFIER_KEY_MEDIUM] = medium
@ -58,6 +65,4 @@ internal data class PasswordLoginParams(@Json(name = "identifier") val identifie
}
}
}

View File

@ -49,7 +49,8 @@ internal data class RoomResponse(
// The invite event if membership is invite.
val invite: Event? = null,
// The presence status of other users (Provided in case of room initial sync @see http://matrix.org/docs/api/client-server/#!/-rooms/get_room_sync_data)).
// The presence status of other users
// (Provided in case of room initial sync @see http://matrix.org/docs/api/client-server/#!/-rooms/get_room_sync_data)).
val presence: List<Event>? = null,
// The read receipts (Provided in case of room initial sync).