Skip to content

Commit

Permalink
Merge pull request #168 from geotribu/ui/maj-traductions
Browse files Browse the repository at this point in the history
UI : MAJ des traductions
  • Loading branch information
Guts authored Apr 30, 2024
2 parents 061973c + 07ddb3f commit ce3889b
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 35 deletions.
5 changes: 3 additions & 2 deletions qtribu/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# standard
from dataclasses import dataclass
from pathlib import Path
from typing import Optional
from urllib.parse import urlparse


Expand All @@ -16,15 +17,15 @@ class RdpNewsCategory:
name: str
description: str
order: int
example: str = None
example: Optional[str] = None


@dataclass
class GeotribuImage:
name: str
url: str
kind: str
description: str = None
description: Optional[str] = None

def local_path(self, base_path: Path = Path().home() / ".geotribu/cdn/") -> Path:
"""Get expected local path.
Expand Down
2 changes: 1 addition & 1 deletion qtribu/gui/form_article.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def accept(self) -> bool:
if len(self.txt_description.toPlainText()) > 160:
invalid_fields.append(self.txt_description)
error_message += self.tr(
"- Description is too long (160 characters at least).\n"
"- Description is too long (160 characters maximum).\n"
)

# check license
Expand Down
10 changes: 9 additions & 1 deletion qtribu/resources/i18n/plugin_translation.pro
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
FORMS = ../../gui/dlg_settings.ui \
FORMS = ../../gui/dlg_contents.ui \
../../gui/dlg_settings.ui \
../../gui/form_article.ui \
../../gui/form_rdp_news.ui \
../../gui/wdg_authoring.ui

SOURCES= ../../plugin_main.py \
../../gui/commons.py \
../../gui/dlg_contents.py \
../../gui/dlg_settings.py \
../../gui/form_article.py \
../../gui/form_rdp_news.py \
../../gui/wdg_authoring.py \
../../logic/custom_datatypes.py \
../../logic/json_feed.py \
../../logic/rss_reader.py \
../../logic/splash_changer.py \
../../logic/web_viewer.py \
../../toolbelt/commons.py \
../../toolbelt/log_handler.py \
../../toolbelt/network_manager.py \
../../toolbelt/preferences.py
Expand Down
Loading

0 comments on commit ce3889b

Please sign in to comment.