Commit dade8c19 authored by Sébastien Toque's avatar Sébastien Toque
Browse files

UI: missing localization strings in code

parent acae555b
......@@ -43,4 +43,13 @@
<string name="loading">Chargement...</string>
<string name="nomedia">Pas de fichiers multimédia</string>
<string name="mediafiles">Fichiers multimédia</string>
<string name="notavailable">Non disponible</string>
<string name="nosubdirectory">Pas de sous-répertoires</string>
<string name="validation">Etes-vous sûr ?</string>
<string name="locked">Verrouillé</string>
<string name="unlocked">Déverrouillé</string>
<string name="surface_fit_horizontal">Ajuster horizontalement</string>
<string name="surface_fit_vertical">Ajuster verticalement</string>
<string name="surface_fill">Etirer</string>
<string name="surface_original">Centrer</string>
</resources>
......@@ -43,4 +43,13 @@
<string name="loading">Loading...</string>
<string name="nomedia">No media files</string>
<string name="mediafiles">Media files</string>
<string name="notavailable">not available</string>
<string name="nosubdirectory">No Subdirectory</string>
<string name="validation">Are you sure ?</string>
<string name="locked">Locked</string>
<string name="unlocked">Unlocked</string>
<string name="surface_fit_horizontal">Fit horizontal</string>
<string name="surface_fit_vertical">Fit vertival</string>
<string name="surface_fill">Fill</string>
<string name="surface_original">Center</string>
</resources>
......@@ -138,15 +138,11 @@ public class AudioPlayerActivity extends Activity implements AudioPlayer {
public void onRepeatClick(View view) {
// mAudioController.repeat();
Util.toaster("not implemented :(");
Util.toaster(R.string.notavailable);
}
public void onShuffleClick(View view) {
// mAudioController.shuffle();
Util.toaster("not implemented :(");
Util.toaster(R.string.notavailable);
}
}
......@@ -63,7 +63,7 @@ public class BrowserActivity extends ListActivity {
mScollStates.push(new ScrollState(index, top));
openDir(file);
} else {
Util.toaster("No Subdirectory");
Util.toaster(R.string.nosubdirectory);
}
}
......
......@@ -38,8 +38,8 @@ public class PreferencesActivity extends PreferenceActivity {
public boolean onPreferenceClick(Preference preference) {
new AlertDialog.Builder(PreferencesActivity.this)
.setTitle("Clear")
.setMessage("Do you really want to whatever?")
.setTitle(R.string.clear_history)
.setMessage(R.string.validation)
.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
......
......@@ -189,7 +189,7 @@ public class VideoPlayerActivity extends Activity {
break;
}
showInfo("locked", 500);
showInfo(R.string.locked, 500);
}
/**
......@@ -197,7 +197,7 @@ public class VideoPlayerActivity extends Activity {
*/
private void unlockScreen() {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
showInfo("unlocked", 500);
showInfo(R.string.unlocked, 500);
}
/**
......@@ -212,6 +212,13 @@ public class VideoPlayerActivity extends Activity {
mHandler.sendEmptyMessageDelayed(FADE_OUT_INFO, duration);
}
private void showInfo(int textid, int duration) {
mInfo.setVisibility(View.VISIBLE);
mInfo.setText(textid);
mHandler.removeMessages(FADE_OUT_INFO);
mHandler.sendEmptyMessageDelayed(FADE_OUT_INFO, duration);
}
/**
* Show text in the info view
* @param text
......@@ -430,13 +437,13 @@ public class VideoPlayerActivity extends Activity {
changeSurfaceSize();
switch (mCurrentSize) {
case SURFACE_FIT_HORIZONTAL:
showInfo("fit horizontal", 500);
showInfo(R.string.surface_fit_horizontal, 500);
break;
case SURFACE_FIT_VERTICAL:
showInfo("fit vertival", 500);
showInfo(R.string.surface_fit_vertical, 500);
break;
case SURFACE_FILL:
showInfo("fill", 500);
showInfo(R.string.surface_fill, 500);
break;
case SURFACE_16_9:
showInfo("16:9", 500);
......@@ -445,7 +452,7 @@ public class VideoPlayerActivity extends Activity {
showInfo("4:3", 500);
break;
case SURFACE_ORIGINAL:
showInfo("original", 500);
showInfo(R.string.surface_original, 500);
break;
}
showOverlay();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment