Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese language support #4

Merged
merged 8 commits into from
Dec 27, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ninjabrainbot/util/I18n.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @since 2021/12/25 14:39
*/
public class I18n {
private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("resources/lang/I18n", Locale.getDefault(), new UTF8Control());
private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("resources/lang/I18n", Locale.US, new UTF8Control());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, how exactly does it know which language to choose, it seems to me that it will always be english based on this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to change back to the original version when I was testing My English


public static String get(String key, Object... args) {
return String.format(BUNDLE.getString(key), args);
Expand Down
2 changes: 1 addition & 1 deletion src/resources/lang/I18n.properties
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ average_distance_to=Average distance to stronghold: %.0f blocks
location=Location
dist=Dist.
nether=Nether
certainty_2=%
certainty_2=%%
53 changes: 53 additions & 0 deletions src/resources/lang/I18n_en_US.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
lang=default
title=Ninjabrain Bot
waiting_f3c=Waiting for F3+C...
ender_eye_throws=Ender eye throws:
undo=Undo
reset=Reset
hide_show_window=Hide/show window
angle=Angle
error=Error
basic=Basic
detailed=Detailed
chunk=Chunk
small=Small
large=Large
settings=Settings
settings.show_nether_coordinates=Show nether coordinates
settings.auto_reset=Auto reset when idle for 15 minutes
settings.always_on_top=Always on top
settings.translucent_window=Translucent window
settings.notify_when_a_new_version_is_available=Notify when a new version is available
settings.display_stronghold_location_using=Display stronghold location using
settings.view_type=View type
settings.theme=Theme
settings.window_size=Window size
settings.show_advanced_options=Show advanced options

settings.standard_deviation=Standard deviation:
settings.calibrate_standard_deviation=Calibrate standard deviation
settings.enable_standard_deviation_toggle=Enable standard deviation toggle
settings.alt_standard_deviation=Alt. standard deviation:
settings.alt_std_on_last_angle= Alt. std on last angle
settings.crosshair_correction=Crosshair correction:
settings.show_angle_errors=Show angle errors
settings.use_advanced_stronghold_statistics=Use advanced stronghold statistics
settings.use_alternative_clipboard_reader=Use alternative clipboard reader
settings.keyboard_shortcuts=Keyboard shortcuts
settings.up_001_to_last_angle=+0.01 to last angle
settings.down_001_to_last_angle=-0.01 to last angle
settings.not_in_use=Not in use

location_blocks=Location: (%d, %d), %d blocks away
chunk_blocks=Chunk: (%d, %d), %d blocks away
certainty=Certainty:
nether_coordinates=Nether coordinates: (%d, %d)
could_not_determine=Could not determine the stronghold chunk.
you_probably_misread=You probably misread one of the eyes.
blind_coords=Blind coords (%.0f, %.0f) are
chance_of=chance of <%d block blind
average_distance_to=Average distance to stronghold: %.0f blocks
location=Location
dist=Dist.
nether=Nether
certainty_2=%%