Skip to content

Commit

Permalink
Make "Infromation" box translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
phpony committed Nov 26, 2023
1 parent eff3ce5 commit 8f25559
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/core/gui/gui-information.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import config from './../../config.js';
import Base_layers_class from './../base-layers.js';
import Tools_settings_class from './../../modules/tools/settings.js';
import Helper_class from './../../libs/helpers.js';
import Tools_translate_class from './../../modules/tools/translate.js';

var template = `
<span class="trn label">Size:</span>
Expand All @@ -30,7 +31,7 @@ class GUI_information_class {
this.Base_layers = new Base_layers_class();
this.Tools_settings = new Tools_settings_class();
this.Helper = new Helper_class();

this.Tools_translate = new Tools_translate_class();
this.last_width = null;
this.last_height = null;
this.units = this.Tools_settings.get_setting('default_units');
Expand All @@ -39,6 +40,9 @@ class GUI_information_class {

render_main_information() {
document.getElementById('toggle_info').innerHTML = template;
if (config.LANG != 'en') {
this.Tools_translate.translate(config.LANG, document.getElementById('toggle_info'));
}
this.set_events();
this.show_size();
}
Expand Down

0 comments on commit 8f25559

Please sign in to comment.