Fixed wrong format in some translated string + added try/catch to prevent a future one from making the app crash

This commit is contained in:
Sylvain Berfini 2023-04-17 11:02:19 +02:00
parent 33b4c09ffd
commit c313e06f8f
4 changed files with 18 additions and 8 deletions

View file

@ -26,11 +26,15 @@ Group changes to describe their impact on the project, as follows:
- Account EXPIRES is now set to 1 month instead of 1 year for sip.linphone.org accounts
- Replaced voice recordings file name by localized placeholder text, like for video conferences invitations
- Removed jetifier as it is not needed
- Switched from gradle 7.5 to 8.0, requires JDK 17 (instead of 11)
### Fixed
- Messages not marked as reply in basic chat room if sending more than 1 content
## [5.0.10] - 2023-01-04
### Fixed
- Plain copy of encrypted files (when VFS is enabled) not cleaned
- Avatar display issue if contact's "initials" contains more than 1 emoji or an emoji + a character
- Messages not marked as reply in basic chat room if sending more than 1 content
## [5.0.9] - 2023-03-30

View file

@ -28,6 +28,7 @@ import android.text.method.LinkMovementMethod
import android.text.style.ClickableSpan
import android.view.View
import androidx.lifecycle.ViewModelProvider
import java.util.UnknownFormatConversionException
import java.util.regex.Pattern
import org.linphone.LinphoneApplication.Companion.corePreferences
import org.linphone.R
@ -85,11 +86,16 @@ class WelcomeFragment : GenericFragment<AssistantWelcomeFragmentBinding>() {
val terms = getString(R.string.assistant_general_terms)
val privacy = getString(R.string.assistant_privacy_policy)
val label = getString(
R.string.assistant_read_and_agree_terms,
terms,
privacy
)
val label = try {
getString(
R.string.assistant_read_and_agree_terms,
terms,
privacy
)
} catch (e: UnknownFormatConversionException) {
Log.e("[Welcome] Wrong R.string.assistant_read_and_agree_terms format!")
"I accept Belledonne Communications' terms of use and privacy policy"
}
val spannable = SpannableString(label)
val termsMatcher = Pattern.compile(terms).matcher(label)

View file

@ -332,7 +332,7 @@
<string name="assistant_ec_calibration">Kaiunpoiston kalibrointi käynnissä</string>
<string name="assistant_phone_number_info_title">Mihin puhelinnumeroani käytetään\?</string>
<string name="assistant_general_terms">käyttöehdot</string>
<string name="assistant_read_and_agree_terms">Hyväksyn Belledonne Communications:n %1$:n ja %2$:n</string>
<string name="assistant_read_and_agree_terms">Hyväksyn Belledonne Communications %1$s ja %2$s</string>
<string name="assistant_generic_account_warning_continue_button_text">Ymmärrän</string>
<string name="assistant_error_phone_number_invalid_characters">Vain numerot ovat sallittuja</string>
<string name="assistant_error_username_already_exists">Käyttäjätunnus on jo käytössä</string>

View file

@ -225,7 +225,7 @@
<string name="assistant_remote_provisioning">קבל הגדרות מרחוק</string>
<string name="assistant_ec_calibration">מכייל ביטול הד</string>
<string name="assistant_phone_number_info_title">למה מספר הטלפון שלי ישמש\?</string>
<string name="assistant_read_and_agree_terms">אני מסכים ל%1$ ו %2$ של \"Belledonne Communications\"</string>
<string name="assistant_read_and_agree_terms">אני מסכים ל%2$s ו %1$s של \"Belledonne Communications\"</string>
<string name="assistant_error_phone_number_invalid_characters">מותר מספרים בלבד</string>
<string name="assistant_error_username_already_exists">משתמש בשימוש</string>
<string name="assistant_error_phone_number_already_exists">כבר קיים חשבון המשתמש במספר זה</string>