Use string substitution to avoid translating trademarked text

This commit is contained in:
Michiyo Wellington-Oguri 2017-07-16 14:28:23 -07:00
parent 44d294efaf
commit 10637f4bf2
3 changed files with 11 additions and 1 deletions

View file

@ -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();
}

View file

@ -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));
}
}