mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Use string substitution to avoid translating trademarked text
This commit is contained in:
parent
44d294efaf
commit
10637f4bf2
3 changed files with 11 additions and 1 deletions
|
|
@ -8,9 +8,11 @@ import android.widget.TextView;
|
|||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import fr.free.nrw.commons.theme.NavigationBaseActivity;
|
||||
import fr.free.nrw.commons.ui.widget.HtmlTextView;
|
||||
|
||||
public class AboutActivity extends NavigationBaseActivity {
|
||||
@BindView(R.id.about_version) TextView versionText;
|
||||
@BindView(R.id.about_license) HtmlTextView aboutLicenseText;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
|
|
@ -19,6 +21,9 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
|
||||
ButterKnife.bind(this);
|
||||
|
||||
String aboutText = getString(R.string.about_license, getString(R.string.trademarked_name));
|
||||
aboutLicenseText.setHtmlText(aboutText);
|
||||
|
||||
versionText.setText(BuildConfig.VERSION_NAME);
|
||||
initDrawer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,8 @@ public class HtmlTextView extends AppCompatTextView {
|
|||
setMovementMethod(LinkMovementMethod.getInstance());
|
||||
setText(Utils.fromHtml(getText().toString()));
|
||||
}
|
||||
|
||||
public void setHtmlText(String newText){
|
||||
setText(Utils.fromHtml(newText));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue