Fixes #4653 - Special characters in this language (Myanmar) seems to be confused with positional argument's holder, extracted out the positional argument outside of quantity string for a possible fix (#4694)

This commit is contained in:
Ashish 2021-10-31 20:42:06 +05:30 committed by GitHub
parent 53e36f9ffa
commit 16e5047d60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View file

@ -161,13 +161,12 @@ public class MediaLicenseFragment extends UploadBaseFragment implements MediaLic
}
@Override
public void updateLicenseSummary(String licenseSummary, int numberOfItems) {
public void updateLicenseSummary(final String licenseSummary, final int numberOfItems) {
String licenseHyperLink = "<a href='" + Utils.licenseUrlFor(licenseSummary) + "'>" +
getString(Utils.licenseNameFor(licenseSummary)) + "</a><br>";
setTextViewHTML(tvShareLicenseSummary, getResources()
.getQuantityString(R.plurals.share_license_summary, numberOfItems,
licenseHyperLink));
setTextViewHTML(tvShareLicenseSummary, String.format("%s%s", getResources()
.getQuantityString(R.plurals.share_license_summary, numberOfItems), licenseHyperLink));
}
private void setTextViewHTML(TextView textView, String text) {

View file

@ -18,8 +18,8 @@
<item quantity="other">%d uploads</item>
</plurals>
<plurals name="share_license_summary">
<item quantity="one">This image will be licensed under %1$s</item>
<item quantity="other">These images will be licensed under %1$s</item>
<item quantity="one">This image will be licensed under</item>
<item quantity="other">These images will be licensed under</item>
</plurals>
<plurals name="upload_count_title">
<item quantity="one">%1$d Upload</item>