diff --git a/doc/software_installation.md b/doc/software_installation.md index e9458f21..7d2db52a 100644 --- a/doc/software_installation.md +++ b/doc/software_installation.md @@ -631,9 +631,8 @@ The settings are dependent on the user environment. - `lang` - The language setting of the label of items. - The default is `EN`. - - You can set other languages with `G_LANG` in modules/gui_config.py. Samples of `JA` are available. - `font_file` - - Set the the full path of the font which you want to use. + - Set the full path of the font which you want to use. - Place the fonts in `fonts/` folder. - `map` - Set the map. diff --git a/modules/gui_config.py b/modules/gui_config.py index 684c5ddf..bdda2046 100644 --- a/modules/gui_config.py +++ b/modules/gui_config.py @@ -326,20 +326,6 @@ class GUI_Config: ), } - G_LANG = { - "JA": { - "Power": "パワー", - "Speed": "スピード", - "Dist.": "距離", - "Cad.": "ケイデンス", - "HR": "心拍", - "Work": "仕事量", - "Timer": "タイマー", - "Ascent": "獲得標高", - # "":"", - }, - } - def __init__(self, config): self.config = config diff --git a/modules/pyqt/menu/pyqt_course_menu_widget.py b/modules/pyqt/menu/pyqt_course_menu_widget.py index e98142b9..8ad613d4 100644 --- a/modules/pyqt/menu/pyqt_course_menu_widget.py +++ b/modules/pyqt/menu/pyqt_course_menu_widget.py @@ -267,7 +267,7 @@ def set_new_course(self): class CourseListItemWidget(ListItemWidget): list_type = None - locality_text = "" + locality_text = ", {elevation_gain:.0f}m up, {locality}, {administrative_area}" def __init__(self, parent, config, list_type=None): super().__init__(parent=parent, config=config) @@ -279,15 +279,6 @@ def __init__(self, parent, config, list_type=None): elif self.list_type == "Ride with GPS": self.enter_signal.connect(self.parentWidget().change_course_detail_page) self.set_simple_list_stylesheet() - self.locality_text = ( - ", {elevation_gain:.0f}m up, {locality}, {administrative_area}" - ) - if self.config.G_LANG in [ - "JA", - ]: - self.locality_text = ( - ", {elevation_gain:.0f}m up, {administrative_area}{locality}" - ) def add_extra(self): self.right_icon = QtWidgets.QLabel() @@ -328,6 +319,8 @@ class CourseDetailWidget(MenuWidget): map_image_size = None profile_image_size = None + address_format = "{locality}, {administrative_area}" + def setup_menu(self): self.make_menu_layout(QtWidgets.QVBoxLayout) @@ -366,12 +359,6 @@ def setup_menu(self): self.menu_layout.addLayout(self.outer_layout) self.menu_layout.addWidget(self.profile_image) - self.address_format = "{locality}, {administrative_area}" - if self.config.G_LANG in [ - "JA", - ]: - self.address_format = "{administrative_area}{locality}" - # update panel for every 1 seconds self.timer = QtCore.QTimer(parent=self) self.timer.timeout.connect(self.update_display) diff --git a/modules/pyqt/pyqt_item.py b/modules/pyqt/pyqt_item.py index 3c05ce2a..ffb6c388 100644 --- a/modules/pyqt/pyqt_item.py +++ b/modules/pyqt/pyqt_item.py @@ -25,13 +25,9 @@ def set_init_value(self, config, name, font_size, bottom_flag, right_flag): self.value = QtWidgets.QLabel() self.value.setAlignment(self.config.gui.gui_config.align_center) self.itemformat = self.config.gui.gui_config.G_ITEM_DEF[name][0] - if ( - self.config.G_LANG in self.config.gui.gui_config.G_LANG - and name in self.config.gui.gui_config.G_LANG[self.config.G_LANG] - ): - self.label.setText(self.config.gui.gui_config.G_LANG["JA"][name]) - else: - self.label.setText(name) + + self.label.setText(name) + self.name = name self.addWidget(self.label)