-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Internationalization of MeepleView.java's tooltip
- Loading branch information
Showing
4 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
src/main/java/carcassonne/l18n/view/secondary/LoadTextMeepleView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package carcassonne.view.secondary; | ||
|
||
import java.lang.System; | ||
import java.util.HashMap; | ||
import java.util.ResourceBundle; | ||
import java.util.Locale; | ||
import java.io.File; | ||
import java.nio.file.Paths; | ||
import java.net.URL; | ||
import java.net.URLClassLoader; | ||
import java.net.MalformedURLException; | ||
|
||
/** | ||
* Load text for MeepleView.java | ||
* @author Mitsugu Oyama | ||
*/ | ||
public class LoadTextMeepleView { | ||
private HashMap<String, String> hmResult; | ||
|
||
public LoadTextMeepleView() { | ||
ResourceBundle rb; | ||
rb = ResourceBundle.getBundle("RBView"); | ||
hmResult = new HashMap<String, String>(); | ||
|
||
hmResult.put("PLACE_MEEPEL", rb.getString("MV_PLACE_MEEPEL.text")); | ||
hmResult.put("BRACKET", rb.getString("MV_BRACKET.text")); | ||
hmResult.put("DONT_PLACE_MEEPLE", rb.getString("MV_DONT_PLACE_MEEPLE.text")); | ||
hmResult.put("CENTER", rb.getString("MV_CENTER.text")); | ||
hmResult.put("EAST", rb.getString("MV_EAST.text")); | ||
hmResult.put("WEST", rb.getString("MV_WEST.text")); | ||
hmResult.put("NORTH", rb.getString("MV_NORTH.text")); | ||
hmResult.put("SOUTH", rb.getString("MV_SOUTH.text")); | ||
hmResult.put("NORTH_EAST", rb.getString("MV_NORTH_EAST.text")); | ||
hmResult.put("NORTH_WEST", rb.getString("MV_NORTH_WEST.text")); | ||
hmResult.put("SOUTH_EAST", rb.getString("MV_SOUTH_EAST.text")); | ||
hmResult.put("SOUTH_WEST", rb.getString("MV_SOUTH_WEST.text")); | ||
} | ||
|
||
public String get(String key) { | ||
return " " + hmResult.get(key.toUpperCase().replaceAll(" ","_")); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters