Skip to content

Commit

Permalink
change local info to demo installer, some change in lang files
Browse files Browse the repository at this point in the history
  • Loading branch information
robin4002 committed Aug 18, 2014
1 parent 2c3c31d commit 4a2fcf2
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 49 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repositories {

group = 'net.minecraftforgefrance'
archivesBaseName = 'installer'
version = '1.0.3'
version = '1.0.4'
targetCompatibility = '1.6'
sourceCompatibility = '1.6'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public static boolean validateJar(File libPath, byte[] data, List<String> checks
}
else
{
System.out.println(LANG.getTranslation("ok.checksumvalidation"));
System.out.println(LANG.getTranslation("file.checksumvalidation.success"));
for(String hash : hashes)
{
if(hash.trim().equals("") || !hash.contains(" "))
Expand All @@ -203,7 +203,7 @@ else if(!checksum.equals(validChecksum))

if(!failed)
{
System.out.println(LANG.getTranslation("ok.jarvalidated"));
System.out.println(LANG.getTranslation("jar.validated.success"));
}

return !failed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ private void compare()
{
for(FileEntry file : this.outdatedList)
{
System.out.println("remote " + md5 + " local " + file.getMd5());
if(file.getMd5().equals(md5))
{
this.outdatedList.remove(file);
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/fr/minecraftforgefrance/common/ProcessInstall.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void deleteDeprecated()
File f = new File(modPackDir, entry.getPath());
if(f.delete())
{
System.out.println(LANG.getTranslation("ok.fileremovedwithmd5").replace("$f", f.getPath()).replace("$m", entry.getMd5()));
System.out.println(String.format(LANG.getTranslation("file.removed.md5.success"), f.getPath(), entry.getMd5()));
}
else
{
Expand Down Expand Up @@ -165,7 +165,7 @@ public void downloadMod(Thread thread)
f.getParentFile().mkdirs();
}
currentDownload.setText(entry.getPath());
System.out.println(LANG.getTranslation("proc.downloadingfile").replace("$f", entry.getUrl().toString()).replace("$t", f.getPath()).replace("$m", entry.getMd5()));
System.out.println(String.format(LANG.getTranslation("proc.downloadingfile"), entry.getUrl().toString(), f.getPath(), entry.getMd5()));
if(!DownloadUtils.downloadFile(entry.getUrl(), f, fileProgressBar, fullProgressBar, downloadSpeedLabel))
{
frame.dispose();
Expand All @@ -177,7 +177,7 @@ public void downloadMod(Thread thread)

public void downloadLib(Thread thread)
{
this.frame.setTitle(LANG.getTranslation("proc.downloadinglibs"));
this.frame.setTitle(LANG.getTranslation("title.libs"));
this.fullProgressBar.setValue(0);

File librariesDir = new File(mcDir, "libraries");
Expand All @@ -202,7 +202,7 @@ public String apply(JsonNode node)
}));
}

System.out.println(LANG.getTranslation("proc.consideringlib") + " " + libName);
System.out.println(String.format(LANG.getTranslation("proc.consideringlib"), libName));
String[] nameparts = Iterables.toArray(Splitter.on(':').split(libName), String.class);
nameparts[0] = nameparts[0].replace('.', '/');
String jarName = nameparts[1] + '-' + nameparts[2] + ".jar";
Expand All @@ -228,9 +228,9 @@ public String apply(JsonNode node)
pack = new File(libPath.getParentFile(), libPath.getName() + DownloadUtils.PACK_NAME);
libURL += DownloadUtils.PACK_NAME;
}
if(library.isStringValue("download"))
if(library.isStringValue("directURL"))
{
libURL = library.getStringValue("download");
libURL = library.getStringValue("directURL");
}
try
{
Expand All @@ -251,7 +251,7 @@ public String apply(JsonNode node)

for(LibEntry entry : libEntryList)
{
currentDownload.setText(LANG.getTranslation("proc.downloadinglib") + entry.getName());
currentDownload.setText(String.format(LANG.getTranslation("proc.downloadinglib"), entry.getName()));
try
{
if(entry.isXZ())
Expand All @@ -268,7 +268,7 @@ public String apply(JsonNode node)
{
currentDownload.setText(LANG.getTranslation("proc.unpackingfile") + " : " + entry.getPackDest().toString());
DownloadUtils.unpackLibrary(entry.getDest(), Files.toByteArray(entry.getPackDest()));
currentDownload.setText(LANG.getTranslation("ok.fileunpacked") + " : " + entry.getPackDest().toString());
currentDownload.setText(String.format(LANG.getTranslation("file.unpacked.success"), entry.getPackDest().toString()));
entry.getPackDest().delete();
}
catch(Exception e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class CreditFrame extends JFrame

public CreditFrame(Dimension dim)
{
this.setTitle(LANG.getTranslation("scr.title.credits"));
this.setTitle(LANG.getTranslation("title.credits"));
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
this.setResizable(false);
JPanel panel = new JPanel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class InstallerFrame extends JFrame implements IInstallRunner

public InstallerFrame()
{
this.setTitle(String.format(LANG.getTranslation("misc.installer"), RemoteInfoReader.instance().getModPackName()));
this.setTitle(String.format(LANG.getTranslation("title.installer"), RemoteInfoReader.instance().getModPackName()));
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
this.setResizable(false);

Expand Down Expand Up @@ -171,7 +171,7 @@ public void run()
@Override
public void onFinish()
{
JOptionPane.showMessageDialog(null, LANG.getTranslation("ok.installationfinished"), LANG.getTranslation("misc.success"), JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, LANG.getTranslation("installation.success"), LANG.getTranslation("misc.success"), JOptionPane.INFORMATION_MESSAGE);
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/fr/minecraftforgefrance/updater/Updater.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ public Updater(String[] args)
FileChecker checker = new FileChecker();
if(!shouldUpdate(jsonProfileData.getStringValue("mc"), jsonProfileData.getStringValue("forge"), checker))
{
System.out.println(LANG.getTranslation("ok.noupdatefound"));
System.out.println(LANG.getTranslation("no.update.found"));
long end = System.currentTimeMillis();
System.out.println(LANG.getTranslation("ok.updatecheckedin") + " : " + (end - start) + " ms");
System.out.println(String.format(LANG.getTranslation("update.checked.in"), (end - start)));
runMinecraft(args);
}
else
Expand Down Expand Up @@ -137,7 +137,7 @@ public void onFinish()
{
if(this.mcUpdate || this.forgeUpdate)
{
JOptionPane.showMessageDialog(null, LANG.getTranslation("ok.updatefinished"), LANG.getTranslation("misc.success"), JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, LANG.getTranslation("update.finished.success"), LANG.getTranslation("misc.success"), JOptionPane.INFORMATION_MESSAGE);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/installer/local_info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"remoteUrl": "http://dl.mcnanotech.fr/hungergames/installateur/remote_info.json"
"remoteUrl": "http://dl.mcnanotech.fr/FFMT/installer/demo/remote_info.json"
}
30 changes: 15 additions & 15 deletions src/main/resources/langs/EN.lang
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,21 @@ err.invalidjson=The local json is not valid, please check it with this website :
err.erroredprofile=Errored profile, please re-install it!

# Tasks done
ok.fileunpacked=Successfully unpacked packed file
ok.fileremovedwithmd5=$f was removed. Its md5 was : $m
ok.checksumvalidation=Successfully validated checksums.sha1
ok.jarvalidated=Jar contents validated successfully
ok.installationfinished=Installation finished!
ok.noupdatefound=No update found, launching minecraft!
ok.updatecheckedin=Update checked in
ok.updatefinished=Update finished successfully, please restart the game!
file.unpacked.success=Successfully unpacked %s
file.removed.md5.success=%1$s was removed. Its md5 was : %2$s
file.checksumvalidation.success=Successfully validated checksums.sha1
jar.validated.success=Jar contents validated successfully
installation.success=Installation finished !
no.update.found=No update found, launching Minecraft !
update.checked.in=Update checked in %d ms
update.finished.success=Update finished successfully, please restart the game !
# Processes running
proc.unpackingfile=Unpacking packed file
proc.downloadinglib=Downloading library
proc.consideringlib=Considering library
proc.downloadinglibs=Downloading and extracting libraries...
proc.downloadingfile=Downloading file $f to $t (its md5 is $m)
proc.downloadinglib=Downloading library %s
proc.consideringlib=Considering library %s
proc.downloadingfile=Downloading file %1$s to %2$s (its md5 is %3$s)
proc.downloadingmods=Downloading mods and config files...
proc.checkingchecksum=Checking \" $p \" internal checksums
proc.checkingchecksum=Checking "$p" internal checksums
proc.startingupdater=Starting the Updater...


Expand All @@ -62,7 +61,9 @@ proc.startingupdater=Starting the Updater...
# SCREEN STUFF #
####################
# Titles
scr.title.credits=Credits
title.credits=Credits
title.libs=Downloading and extracting libraries...
title.installer=%s Installer

# Buttons
scr.btn.mffwebsite=Minecraft Forge France website
Expand All @@ -84,7 +85,6 @@ misc.failed=Failed
misc.error=Error
misc.cancel=Cancel
misc.success=Success
misc.installer=%s Installer



Expand Down
30 changes: 15 additions & 15 deletions src/main/resources/langs/FR.lang
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,22 @@ err.invalidjson=Json local invalide, veuillez le vérifiez avec http://jsonlint.
err.erroredprofile=Profil érroné, veuiller utiliser le launcher officiel pour corriger cela!

# Tâches effectuées
ok.fileunpacked=Fichier correctement décompressé
ok.fileremovedwithmd5=$f a été supprimé. Son MD5 était $m
ok.checksumvalidation=checksums.sha1 correctement validé
ok.jarvalidated=Contenu du .jar vérirfié avec succès
ok.installationfinished=Installation terminée!
ok.noupdatefound=Aucune mise à jour trouvée, lancement de Minecraft!
ok.updatecheckedin=Présence de mise à jour vérifiée en
ok.updatefinished=Mise à jour terminée avec succès, veuillez redémarrer Minecraft!
file.unpacked.success=%s à été décompressé
file.removed.md5.success=%1$s a été supprimé. Son MD5 était %2$s
file.checksumvalidation.success=checksums.sha1 correctement validé
jar.validated.success=Contenu du .jar vérifié avec succès
installation.success=Installation terminée !
no.update.found=Aucune mise à jour trouvée, lancement de Minecraft !
update.checked.in=Présence de mise à jour vérifiée en %d ms
update.finished.success=Mise à jour terminée avec succès, veuillez relancer Minecraft !

# Processus
proc.unpackingfile=Décompression du fichier
proc.downloadinglib=Téléchargement de la librairie
proc.consideringlib=Prise en compte de la librairie
proc.downloadinglibs=Téléchargement et décompression des librairies
proc.downloadingfile=Téléchargement du fichier $f vers $t (MD : $m)
proc.downloadinglib=Téléchargement de la bibliothèque %s
proc.consideringlib=Examination de la bibliothèque %s
proc.downloadingfile=Téléchargement du fichier %1$s vers %2$s (MD : %3$s)
proc.downloadingmods=Téléchargement des mods et des fichiers de configuration...
proc.checkingchecksum=Vérification des signatures intenrnes " $p "
proc.checkingchecksum=Vérification des signatures internes "$p"
proc.startingupdater=Démarrage de l'utilitaire de mise à jour..


Expand All @@ -63,7 +62,9 @@ proc.startingupdater=Démarrage de l'utilitaire de mise à jour..
# AFFICHAGE DU GUI #
########################
# Nom des fenêtres
scr.title.credits=Crédits
title.credits=Crédits
title.libs=Téléchargement et décompression des bibliothèques...
title.installer=Installeur de %s

# Boutons
scr.btn.mffwebsite=Site web de Minecraft Forge France
Expand All @@ -85,7 +86,6 @@ misc.failed=Échoué
misc.error=Erreur
misc.cancel=Annuler
misc.success=Succès
misc.installer=Installeur de %s



Expand Down

0 comments on commit 4a2fcf2

Please sign in to comment.