Skip to content
This repository has been archived by the owner on Jun 20, 2021. It is now read-only.

Commit

Permalink
Add French support(Provided by YoungRichNigger9 on GitHub) and update…
Browse files Browse the repository at this point in the history
… notification code.
  • Loading branch information
fengberd committed Jul 16, 2016
1 parent 7961fcf commit 559d2cf
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "net.fengberd.minecraftpe_server"
minSdkVersion 14
targetSdkVersion 21
versionCode 7
versionName "1.0.6"
versionCode 8
versionName "1.0.7"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.os.*;
import android.app.*;
import android.content.*;
import android.support.v4.app.*;

public class ServerService extends Service
{
Expand Down Expand Up @@ -32,14 +33,13 @@ private void run()
if(!isRunning)
{
isRunning=true;
Context context = getApplicationContext();
Notification note = new Notification(R.drawable.ic_launcher,(MainActivity.nukkitMode?"Nukkit":"PocketMine")+" is running",System.currentTimeMillis());
Intent i = new Intent(context,MainActivity.class);
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent pi = PendingIntent.getActivity(this,0,i,0);
note.setLatestEventInfo(this,(MainActivity.nukkitMode?"Nukkit":"PocketMine")+" "+MainActivity.instance.getString(R.string.message_running),MainActivity.instance.getString(R.string.message_tap_open),pi);
note.flags|=Notification.FLAG_NO_CLEAR;
startForeground(1337,note);
NotificationCompat.Builder builder=new NotificationCompat.Builder(getApplicationContext());
builder.setContentTitle((MainActivity.nukkitMode?"Nukkit":"PocketMine")+" "+MainActivity.instance.getString(R.string.message_running));
builder.setContentText(MainActivity.instance.getString(R.string.message_tap_open));
builder.setOngoing(true);
builder.setSmallIcon(R.drawable.ic_launcher);
builder.setContentIntent(PendingIntent.getActivity(this,0,new Intent(getApplicationContext(),MainActivity.class),0));
startForeground(1337,builder.getNotification());
}
}

Expand Down
48 changes: 48 additions & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
French translated by:
[email protected]
Thank for everyone above!
-->
<resources>
<string name="application_name">Pocket Server</string>

<string name="activity_main">Pocket Server</string>
<string name="activity_console">Console</string>

<string name="button_send">Envoyer</string>
<string name="button_stop">Arrêter le serveur</string>
<string name="button_start">Démarrer le serveur</string>
<string name="button_mount">Monter la Bibliothèque Java(ROOT)</string>

<string name="check_nukkit">Nukkit</string>
<string name="check_pocketmine">PocketMine</string>
<string name="check_ansi">Activer le support ANSI</string>
<string name="check_kusud">Utiliser (ku.sud) pour demande l\'accès root</string>

<string name="message_copied">Copié.</string>
<string name="message_done">Fini.</string>
<string name="message_running">est en cours d’exécution</string>
<string name="message_tap_open">Appuyez pour ouvrir le serveur MinecraftPE</string>
<string name="message_installing">Installation, s’il vous plaît patienter...</string>
<string name="message_downloading">Téléchargement de %s ...</string>
<string name="message_install_fail">L\'installation a échoué:</string>
<string name="message_install_success">Installez avec succès.</string>
<string name="message_install_fail_path">L\'installation a échoué,s’il vous plaît mes "nukkit_library.tar.gz" à</string>
<string name="message_no_artifacts">Aucun artefact trouvé.</string>
<string name="message_select_repository">S\'il vous plaît sélectionner un référentiel %s</string>

<string name="label_management">Gestion du serveur</string>
<string name="label_type">Type de server</string>
<string name="label_console">Personnaliser le console</string>
<string name="label_console_fontsize">Taille de police:</string>

<string name="menu_console">Console</string>
<string name="menu_kill">Arrêter le server</string>
<string name="menu_clear">Effacer</string>
<string name="menu_copy">Copié</string>
<string name="menu_install_php">Installer PHP</string>
<string name="menu_install_php7">Télécharger &amp; Installer PHP7</string>
<string name="menu_install_java">Installer Java</string>
<string name="menu_download">Télécharger le serveur</string>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<string name="message_copied">已复制.</string>
<string name="message_done">操作完成.</string>
<string name="message_running">正在运行</string>
<string name="message_tap_open">点击打开 MinecraftPE 服务器</string>
<string name="message_tap_open">点击打开口袋服务器</string>
<string name="message_installing">正在安装,请稍候...</string>
<string name="message_downloading">正在下载 %s ...</string>
<string name="message_install_fail">安装失败:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<string name="message_copied">Copied.</string>
<string name="message_done">Done.</string>
<string name="message_running">is running</string>
<string name="message_tap_open">Tap to open MinecraftPE Server</string>
<string name="message_tap_open">Tap to open Pocket Server</string>
<string name="message_installing">Installing,Please wait...</string>
<string name="message_downloading">Downloading %s ...</string>
<string name="message_install_fail">Install failed:</string>
Expand Down

0 comments on commit 559d2cf

Please sign in to comment.