Merge pull request #127 from ultrasonic/add-generic-error-message

Append generic error message to displayed text.
This commit is contained in:
Yahor Berdnikau 2018-01-08 19:53:29 +01:00 committed by GitHub
commit fa03cf3881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 7 deletions

View File

@ -20,7 +20,7 @@ import org.moire.ultrasonic.service.parser.SubsonicRESTException
*/ */
fun SubsonicRESTException.getLocalizedErrorMessage(context: Context): String = fun SubsonicRESTException.getLocalizedErrorMessage(context: Context): String =
when (error) { when (error) {
GENERIC -> context.getString(R.string.api_subsonic_generic) GENERIC -> context.getString(R.string.api_subsonic_generic, message)
REQUIRED_PARAM_MISSING -> context.getString(R.string.api_subsonic_param_missing) REQUIRED_PARAM_MISSING -> context.getString(R.string.api_subsonic_param_missing)
INCOMPATIBLE_CLIENT_PROTOCOL_VERSION -> context INCOMPATIBLE_CLIENT_PROTOCOL_VERSION -> context
.getString(R.string.api_subsonic_upgrade_client) .getString(R.string.api_subsonic_upgrade_client)

View File

@ -423,7 +423,7 @@
<string name="podcasts_channels.empty">No hay canales de Podcasts registrados</string> <string name="podcasts_channels.empty">No hay canales de Podcasts registrados</string>
<!-- Subsonic api errors --> <!-- Subsonic api errors -->
<string name="api.subsonic.generic">Error genérico de api.</string> <string name="api.subsonic.generic">Error genérico de api: %1$s</string>
<string name="api.subsonic.token_auth_not_supported_for_ldap">La autenticación por token no es compatible con usuarios LDAP.</string> <string name="api.subsonic.token_auth_not_supported_for_ldap">La autenticación por token no es compatible con usuarios LDAP.</string>
<string name="api.subsonic.not_authenticated">Nombre de usuario o contraseña incorrectos.</string> <string name="api.subsonic.not_authenticated">Nombre de usuario o contraseña incorrectos.</string>
<string name="api.subsonic.not_authorized">No autorizado. Comprueba los permisos de usuario en el servidor de Subsonic.</string> <string name="api.subsonic.not_authorized">No autorizado. Comprueba los permisos de usuario en el servidor de Subsonic.</string>

View File

@ -423,7 +423,7 @@
<string name="podcasts_channels.empty">No podcasts channels registered</string> <string name="podcasts_channels.empty">No podcasts channels registered</string>
<!-- Subsonic api errors --> <!-- Subsonic api errors -->
<string name="api.subsonic.generic">Erreur api générique.</string> <string name="api.subsonic.generic">Erreur api générique: %1$s</string>
<string name="api.subsonic.token_auth_not_supported_for_ldap">L\'authentification par jeton n\'est pas prise en charge pour les utilisateurs LDAP.</string> <string name="api.subsonic.token_auth_not_supported_for_ldap">L\'authentification par jeton n\'est pas prise en charge pour les utilisateurs LDAP.</string>
<string name="api.subsonic.not_authenticated">Mauvais nom d\'usager ou mot de passe.</string> <string name="api.subsonic.not_authenticated">Mauvais nom d\'usager ou mot de passe.</string>
<string name="api.subsonic.not_authorized">Non autorisé. Vérifiez les permissions de l\'utilisateur dans le serveur Subsonic.</string> <string name="api.subsonic.not_authorized">Non autorisé. Vérifiez les permissions de l\'utilisateur dans le serveur Subsonic.</string>

View File

@ -423,7 +423,7 @@
<string name="podcasts_channels.empty">No podcasts channels registered</string> <string name="podcasts_channels.empty">No podcasts channels registered</string>
<!-- Subsonic api errors --> <!-- Subsonic api errors -->
<string name="api.subsonic.generic">Általános api hiba.</string> <string name="api.subsonic.generic">Általános api hiba: %1$s</string>
<string name="api.subsonic.token_auth_not_supported_for_ldap">Az LDAP-felhasználók számára nem támogatott a token-hitelesítés.</string> <string name="api.subsonic.token_auth_not_supported_for_ldap">Az LDAP-felhasználók számára nem támogatott a token-hitelesítés.</string>
<string name="api.subsonic.not_authenticated">Hibás felhasználónév vagy jelszó!</string> <string name="api.subsonic.not_authenticated">Hibás felhasználónév vagy jelszó!</string>
<string name="api.subsonic.not_authorized">Nem engedélyezett! Ellenőrizze a felhasználó jogosultságait a Subsonic kiszolgálón!</string> <string name="api.subsonic.not_authorized">Nem engedélyezett! Ellenőrizze a felhasználó jogosultságait a Subsonic kiszolgálón!</string>

View File

@ -423,7 +423,7 @@
</plurals> </plurals>
<!-- Subsonic api errors --> <!-- Subsonic api errors -->
<string name="api.subsonic.generic">Erro de api genérico.</string> <string name="api.subsonic.generic">Erro de api genérico: %1$s</string>
<string name="api.subsonic.token_auth_not_supported_for_ldap">A autenticação por token não é suportada para usuários LDAP.</string> <string name="api.subsonic.token_auth_not_supported_for_ldap">A autenticação por token não é suportada para usuários LDAP.</string>
<string name="api.subsonic.not_authenticated">Login ou senha errada.</string> <string name="api.subsonic.not_authenticated">Login ou senha errada.</string>
<string name="api.subsonic.not_authorized">Não autorizado. Verifique as permissões do usuário no servidor Subsonic.</string> <string name="api.subsonic.not_authorized">Não autorizado. Verifique as permissões do usuário no servidor Subsonic.</string>

View File

@ -423,7 +423,7 @@
</plurals> </plurals>
<!-- Subsonic api errors --> <!-- Subsonic api errors -->
<string name="api.subsonic.generic">Erro de api genérico.</string> <string name="api.subsonic.generic">Erro de api genérico: %1$s</string>
<string name="api.subsonic.token_auth_not_supported_for_ldap">A autenticação por token não é suportada para usuários LDAP.</string> <string name="api.subsonic.token_auth_not_supported_for_ldap">A autenticação por token não é suportada para usuários LDAP.</string>
<string name="api.subsonic.not_authenticated">Login ou senha errada.</string> <string name="api.subsonic.not_authenticated">Login ou senha errada.</string>
<string name="api.subsonic.not_authorized">Não autorizado. Verifique as permissões do usuário no servidor Subsonic.</string> <string name="api.subsonic.not_authorized">Não autorizado. Verifique as permissões do usuário no servidor Subsonic.</string>

View File

@ -425,7 +425,7 @@
</plurals> </plurals>
<!-- Subsonic api errors --> <!-- Subsonic api errors -->
<string name="api.subsonic.generic">Generic api error.</string> <string name="api.subsonic.generic">Generic api error: %1$s</string>
<string name="api.subsonic.token_auth_not_supported_for_ldap">Authentication by token is not supported for LDAP users.</string> <string name="api.subsonic.token_auth_not_supported_for_ldap">Authentication by token is not supported for LDAP users.</string>
<string name="api.subsonic.not_authenticated">Wrong username or password.</string> <string name="api.subsonic.not_authenticated">Wrong username or password.</string>
<string name="api.subsonic.not_authorized">Not authorized. Check user permissions in Subsonic server.</string> <string name="api.subsonic.not_authorized">Not authorized. Check user permissions in Subsonic server.</string>