From c4a0122a793d0b4b31dda40b8aa79a5f2b4bc485 Mon Sep 17 00:00:00 2001 From: chrislo27 Date: Sun, 5 Feb 2017 11:13:21 -0800 Subject: [PATCH] Attempt localization and fail --- core/assets/images/ui/language.png | Bin 0 -> 1373 bytes .../assets/localization/default_fr.properties | 98 ++++++++++++++++++ core/src/chrislo27/rhre/Main.kt | 4 + .../chrislo27/rhre/init/DefAssetLoader.java | 2 + 4 files changed, 104 insertions(+) create mode 100644 core/assets/images/ui/language.png create mode 100644 core/assets/localization/default_fr.properties diff --git a/core/assets/images/ui/language.png b/core/assets/images/ui/language.png new file mode 100644 index 0000000000000000000000000000000000000000..577ecf9f8603bfca2890547b2799913ffaaec470 GIT binary patch literal 1373 zcmV-j1)}N2bZe?^J zG%heMF*7s+TY3Nh1lmbNK~z{rjh9gbXln}s2~DU%fnE@8DTU!GmIiBY2unrOVd7+*AMqKW#ZiJC@@)~aRu z|C_Uq=dup)@MX@d*=w)=?7j9{dy7W8I@R#5Zpqwl{Fs=#*x7z{=&h0Y4T>;;NS3xz%kYW(o7)@LYV&LPH*yQgk zkM^mIr%$T1`Vp6ar09%V)(}@&$6M5z6AdcVbjI_0;xF(8=mzV>SUy8EaXn}SU#HYg zT)pYce(tY|jBZvr&mQ##u$WOf9Y@s0!TZ#@o?4Y0n{xg>3w{J~Q0$B6`ZD+CN5FSr zHq>-dm5i6!OMJ@<5340lzU-V_v#PPz9>;`C^{tfVXD|d@E8z^zJ>LVq0#vP5w{+?W zjR3Af=CL;4|@*;Bw-U7Y=Q6ix{m?+0QhpY~%!= zjhz(q?{xVKFfm^N`iL3%=4oQ^3t&7)S#(DL7Vzc0jM7oQ|i& zIRrigr4(={c;7Mx!ZU7ybm32Xk4dI zKQ4-Mc+dh^elIzU^RlY(Ib98%0zwGLCS;Ck(eT}BO;>};YHvZe91`aNm%#u9Yy+(S z(jXs8YA*Ut0egfIWT0J_?e5NHi~`sL-m;8~BHY^H65tK)gymYA1MrelO#wOJ zv}IfrY(U-~Ai*sWE-8k0K!gHPK^5SVNCSN^!B}#opa!nY+OE2wWMtDj3s#tBvzUU{472NmCkO+hQ#YOFAS1{kG#HpfdXg`w{(eqfNwtl^wnJputekm zUYS^-Bu5u(yXyi4F#FRF4M=|fg7-kV9oHcs4e%QNHjtcMWHk4n0?yR~3Sq(-LB%+h zELwseGoLHH!Y9BIu@XE07VM5}(S=rrG$PD%{#oq5|MJT2#|v+!E2i^{HbfI4a6e#e zn0Gta{Y+3Jf;Xa2(`n~8F8gPo0c82&c@5e)w-UUj4T8Yq$qu>x`Mr88SPgGH6;){s z!_F~GxYxlh;CgdAmSiMwU{2(MN5C`)5HgKx_@r8jt2oQFWoO`b!C}BZwDz8R5sgmZ z%p;^r6S9d1UufPOkW8p=ULHohu;C8U!zhu!UfyuZc*?@1v)3O6_X$cc|3t-S2 fK;Rp@QAz&+=TBfqXFxbY00000NkvXXu0mjfLd$hb literal 0 HcmV?d00001 diff --git a/core/assets/localization/default_fr.properties b/core/assets/localization/default_fr.properties new file mode 100644 index 000000000..8f5fd0db9 --- /dev/null +++ b/core/assets/localization/default_fr.properties @@ -0,0 +1,98 @@ +versionAvailable=Une nouvelle version est disponible! ([GREEN]{0}[]) - actuellement [ORANGE]{1}[] + +# Inspections +inspections.notOnbeat.name=Pas de rythme +inspections.notOnbeat.info=Cela devrait être dans le rythme (aligné avec le marqueur). +inspections.notOffbeat.name=Pas décevant +inspections.notOffbeat.info=Cela devrait être décevant (à mi-chemin aligné avec les marqueurs). +inspections.missing.name=Cue manquante +inspections.missing.info={0} doit avoir un {1} au rythme {2}. +inspections.missingBefore.name=Cue manquante avant +inspections.missingBefore.info={0} doit avoir un {1} avant. +inspections.missingAfter.name=Cue manquante après +inspections.missingAfter.info={0} doit avoir un {1} après + +editor.currentGame=Jeu en cours : +editor.lookingAt=[GRAY]{0}[] +editor.delete=Faites glisser et déposez ici pour supprimer +editor.scrollPatterns=Faites défiler la page vers le bas +editor.beatTrackerBeat=rythme {0} +editor.beatTrackerSec={0} s +editor.beatTrackerBpm={0} BPM +editor.musicStartTracker=musique\nrythme {0} +editor.playbackStartTracker=lecture\nrythme {0} +editor.bpmTracker=-> {0} BPM +editor.bpmToolStatus=Instructions de changement de tempo - \ +Clic gauche pour ajouter, clic droit pour supprimer, roulette de défilement pour changer BPM (maintenir le contrôle pour +/- 5) +editor.splitPatternToolStatus=Instructions de l'outil de fendage de motif - \ +Cliquez sur un motif pour le diviser en parties distinctes (vous ne pouvez pas annuler cette action) +editor.stretchStatus1=Longueur courante : +editor.stretchStatus2=Longueur originale : +editor.inspectionStatus={0} avertissement(s) trouvé(s)\n{1} ms écoulé + +editor.button.paletteSwap=Permuter les palettes +editor.button.music=La musique +editor.button.metronome.on=Métronome: Vrai +editor.button.metronome.off=Métronome: Faux +editor.button.snap=Alignement : {0} +editor.button.tapalong=Recherche de rythme +editor.button.inspections=Inspections +editor.button.inspections.on=Inspections : Vrai +editor.button.inspections.off=Inspections : Faux +editor.button.helpTips.on=Conseils d'aide : Vrai +editor.button.helpTips.off=Conseils d'aide : Faux + +tapalong.firstBeat=Premier rythme +tapalong.resetTime=Press [CYAN]SPACE[] to tap along, press [RED]R[] or wait {0} seconds to reset.\n\ +The maximum amount of inputs stored is {1}.\n\ +Press [RED]ESCAPE[] to exit back to the editor. +tapalong.realBpm=Average BPM\n{0}\nInput count\n{1} + +info.credits=\ +[LIGHT_GRAY]La programmation[]\n\ +chrislo27\ +\n\n[LIGHT_GRAY]La base de données[]\n\ +ahemtoday, Huebird of Happiness\ +\n\n[LIGHT_GRAY]Les effets sonores[]\n\ +F Yeah, Rhythm Heaven! Tumblr\nahemtoday\nmegaminerzero, Chocolate2890, Whistler_420, TieSoul, Huebird of Happiness\ +\n\n[LIGHT_GRAY]Les icônes[]\n\ +ahemtoday, Whistler_420, Sir Killble, TheNewOrchestra\ +\n\n[LIGHT_GRAY]Diverses améliorations[]\n\ +Pengu12345 +info.back=Press [RED]ESCAPE[] to go back to the editor. +info.stats=\ +Games implemented: {0}\n\ +Patterns: {1}\n\ +Sound cues: {2} +info.rhcrdj=Have you tried [LIGHT_GRAY]megaminerzero[]'s Rhythm Heaven Custom Remix DJ? It's a sort-of soundboard \ + with a lot more games than this editor. [CYAN]Click here[] to go to the reddit post. + +musicScreen.title=Music Select +musicScreen.return=[CYAN]Scroll[] to change the volume (hold CONTROL for +/- 5).\n\ + Press [CYAN]X[] to remove the song.\nPress [RED]ESCAPE[] to return to the editor. +musicScreen.current=Current music: +musicScreen.noMusic=no music +musicScreen.volume=Volume: {0}% + +warning.remixOverwrite=[RED]Warning:[] this action will lose all unsaved changes. + +newScreen.title=New Remix +newScreen.confirm=Press [CYAN]ENTER[] to start a new remix, losing all unsaved changes. +newScreen.return=Press [RED]ESCAPE[] to return to the editor without losing changes. + +saveScreen.title=Save Remix +saveScreen.return=Press [RED]ESCAPE[] to return to the editor. +saveScreen.current=Current location: +saveScreen.noSave=no save location +saveScreen.overwrite=[RED]Warning:[] this will overwrite the file chosen without warning + +loadScreen.title=Load Remix +loadScreen.return=Press [RED]ESCAPE[] to return to the editor and cancel this operation. +loadScreen.confirm=Press [CYAN]ENTER[] to confirm loading this remix, losing all unsaved changes. +loadScreen.versionMismatch=[ORANGE]Caution:[] the version this remix was saved in ([GRAY]{0}[]) [PINK]differs[] \ +from the current one, which is [LIGHT_GRAY]{1}[]. \ +The editor may [RED]crash[] when attempting to load the file, or some parts may be [RED]missing[]. +loadScreen.missingContent=[RED]Warning:[] the remix you are trying to load has content the editor doesn't have.\n{0} +loadScreen.remixInfo=[LIGHT_GRAY]Remix Info[]\n\ +Cue count: {0}\n\ +Tempo changes: {1} \ No newline at end of file diff --git a/core/src/chrislo27/rhre/Main.kt b/core/src/chrislo27/rhre/Main.kt index 32d2d3587..56b3e9791 100644 --- a/core/src/chrislo27/rhre/Main.kt +++ b/core/src/chrislo27/rhre/Main.kt @@ -23,6 +23,8 @@ import ionium.registry.ScreenRegistry import ionium.util.DebugSetting import ionium.util.Logger import ionium.util.i18n.Localization +import ionium.util.i18n.NamedLocale +import java.util.* class Main(l: Logger) : ionium.templates.Main(l) { @@ -73,6 +75,8 @@ class Main(l: Logger) : ionium.templates.Main(l) { preferences = Gdx.app.getPreferences("RHRE2") helpTipsEnabled = preferences.getBoolean("helpTipsEnabled", helpTipsEnabled) inspectionsEnabled = preferences.getBoolean("inspectionsEnabled", inspectionsEnabled) + + Localization.instance().addBundle(NamedLocale("Français", Locale("fr"))) } override fun prepareStates() { diff --git a/core/src/chrislo27/rhre/init/DefAssetLoader.java b/core/src/chrislo27/rhre/init/DefAssetLoader.java index 519096ed8..344e49a04 100644 --- a/core/src/chrislo27/rhre/init/DefAssetLoader.java +++ b/core/src/chrislo27/rhre/init/DefAssetLoader.java @@ -27,6 +27,8 @@ public void addManagedAssets(AssetManager manager) { } manager.load(AssetMap.add("ptr_whole", "images/ptr/full.png"), Texture.class); + + manager.load(AssetMap.add("ui_language", "images/ui/language.png"), Texture.class); } @Override