Skip to content

Commit

Permalink
Ptosiek/remove-multilangからのマージプルリクエスト#33
Browse files Browse the repository at this point in the history
Temporary remove multilang
  • Loading branch information
hishizuka authored Oct 2, 2023
2 parents cdd3a4a + 0ed46fa commit 386b8dd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 39 deletions.
3 changes: 1 addition & 2 deletions doc/software_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 0 additions & 14 deletions modules/gui_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 3 additions & 16 deletions modules/pyqt/menu/pyqt_course_menu_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
10 changes: 3 additions & 7 deletions modules/pyqt/pyqt_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 386b8dd

Please sign in to comment.