Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java

Issue 29370727: Issue 4505 - Add translations (Closed)
Patch Set: Created Jan. 4, 2017, 5:24 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« res/values/strings.xml ('K') | « res/values/strings.xml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java
===================================================================
--- a/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java
+++ b/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java
@@ -102,17 +102,17 @@ public class MainPreferences extends Pre
private void checkForCompatibleSBrowserAndProceed()
{
if (!Engine.hasCompatibleSBrowserInstalled(this.getApplicationContext()))
{
final AlertDialog d = new AlertDialog.Builder(this)
.setCancelable(false)
.setTitle(R.string.sbrowser_dialog_title)
- .setMessage(Html.fromHtml(this.readTextFile(R.raw.sbrowser_dialog)))
+ .setMessage(Html.fromHtml(getString(R.string.sbrowser_dialog_message)))
.setNeutralButton(R.string.sbrowser_dialog_button, new OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
try
{
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="
@@ -138,17 +138,17 @@ public class MainPreferences extends Pre
final SharedPreferences prefs = this.getSharedPreferences();
final String keyAaInfoShown = this.getString(R.string.key_aa_info_shown);
final boolean aaInfoShown = prefs.getBoolean(keyAaInfoShown, false);
if (!aaInfoShown)
{
final AlertDialog d = new AlertDialog.Builder(this)
.setCancelable(false)
.setTitle(R.string.aa_dialog_title)
- .setMessage(Html.fromHtml(this.readTextFile(R.raw.aa_dialog)))
+ .setMessage(Html.fromHtml(getString(R.string.aa_dialog_message)))
.setNeutralButton(R.string.aa_dialog_button, new OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
prefs.edit()
.putBoolean(keyAaInfoShown, true)
.commit();
@@ -169,17 +169,17 @@ public class MainPreferences extends Pre
.getBoolean(this.getString(R.string.key_application_activated), false);
if (!applicationActivated)
{
Log.d(TAG, "Showing setup dialog");
this.setupDialog = new AlertDialog.Builder(this)
.setCancelable(false)
.setTitle(R.string.setup_dialog_title)
- .setMessage(Html.fromHtml(this.readTextFile(R.raw.setup_dialog)))
+ .setMessage(Html.fromHtml(getString(R.string.setup_dialog_message)))
.setNeutralButton(R.string.setup_dialog_button, new OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
Engine.openSBrowserSettings(MainPreferences.this);
}
})
« res/values/strings.xml ('K') | « res/values/strings.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld