Skip to content

Commit

Permalink
Merge pull request #24 from r-liner/dev (v2.3.0)
Browse files Browse the repository at this point in the history
v2.3.0
  • Loading branch information
liner-exe committed May 22, 2024
2 parents be6ccfe + 848b0ed commit b9744e3
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.0
2.3.0
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PasswordGenerator-GUI (v2.2.0)
# PasswordGenerator-GUI (v2.3.0)
## ❓ About
**Password Generator** with graphical interface on *customtkinter*. <br>
It`s basicaly project i made for fun. And as well for **password generation** purposes. <br>
Expand All @@ -25,7 +25,7 @@ So you can *contribute* this, you can *request new features*.
## ⚙️ Compatibility
| **Operation System** | **Status** | **Version**|
| :---------: | :-----------: | :-----------: |
| **Windows** | 🟢 Compatible | v2.2.0 |
| **Windows** | 🟢 Compatible | v2.3.0 |
| **Linux** | 🟡 Not tested | x |
| **MacOS** | 🟡 Not tested | x |

Expand Down
17 changes: 12 additions & 5 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self):

self.response = Response(f"{path}/i18n", settings['app']['locale'])

self.title(f'{self.response.get("app-title")} v2.0.1')
self.title(f'{self.response.get("app-title")} v2.3.0')
self.iconbitmap(f'{path}/icon.ico')

self.settings = configparser.ConfigParser()
Expand Down Expand Up @@ -286,7 +286,7 @@ def open_settings(self):
accent_label.grid(row=2, column=1, padx=50)

locale_dropdown = ctk.CTkComboBox(customization,
values=['English', 'Русский'],
values=['English', 'Русский', 'Français'],
command=lambda value: self.switch_locale(value),
font=('ubuntu' if platform.system() == 'Linux' else 'Arial', 20))

Expand All @@ -302,7 +302,8 @@ def open_settings(self):
def switch_locale(self, locale):
locales = {
'English': 'en-us',
'Русский': 'ru-ru'
'Русский': 'ru-ru',
'Français': 'fr-fr'
}

self.app_locale = locales[locale]
Expand All @@ -311,7 +312,8 @@ def switch_locale(self, locale):
def locale_to_string(locale):
locales = {
'en-us': 'English',
'ru-ru': 'Русский'
'ru-ru': 'Русский',
'fr-fr': 'Français'
}

return locales[locale]
Expand Down Expand Up @@ -385,7 +387,12 @@ def save_settings(self):
saved.after(1000, saved.destroy)

saved_label_text = self.response.get("save-message")
saved_label = ctk.CTkLabel(saved, text=saved_label_text, font=('ubuntu' if platform.system() == 'Linux' else 'Arial', 20))

if self.app_locale == 'fr-fr':
saved_label = ctk.CTkLabel(saved, text=saved_label_text, font=('ubuntu' if platform.system() == 'Linux' else 'Arial', 14))
else:
saved_label = ctk.CTkLabel(saved, text=saved_label_text, font=('ubuntu' if platform.system() == 'Linux' else 'Arial', 20))

saved_label.pack(padx=30)

def open_about(self):
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"button-close": "CLOSE",
"about-title": "About",
"about-label": "Developed by r-liner © 2023-2024",
"about-open-github": "Open developer GitHub",
"about-open-github": "Open the developer's GitHub",
"about-open-repository": "Open repository page",
"about-see-latest": "See latest version",
"error-title": "Error",
Expand Down
37 changes: 37 additions & 0 deletions src/i18n/fr-fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"LOCALE": "Français",
"app-title": "Générateur de Mot de Passe",
"password-length": "Longueur du Mot de Passe",
"button-generate": "GÉNÉRER",
"button-clear": "CLAIR",
"button-copy": "COPIER",
"button-settings": "PARAMÈTRES",
"button-about": "SUJET",
"switch-digits": "chiffres",
"switch-lowercase": "minuscules",
"switch-uppercase": "majuscules",
"switch-punctuation": "ponctuation",
"title-settings": "Paramètres",
"dropdown-window-scaling": "Mise à l'échelle de la fenêtre",
"dropdown-widget-scaling": "Mise à l'échelle des widgets",
"dropdown-theme-color": "Couleur du thème",
"dropdown-theme-accent": "Couleur d'accent",
"theme-dark": "Sombre",
"theme-white": "Blanc",
"theme-system": "Système",
"theme-accent-green": "Vert",
"theme-accent-blue": "Bleu",
"theme-accent-dark-blue": "Bleu Foncé",
"dropdown-locale": "Paramètres linguistiques",
"button-save": "SAUVER",
"button-close": "FERMER",
"about-title": "Sujet",
"about-label": "Développé par r-liner © 2023-2024",
"about-open-github": "Ouvrir le GitHub du développeur",
"about-open-repository": "Ouvrir la page du référentiel",
"about-see-latest": "Voir la dernière version",
"error-title": "Erreur",
"error-message": "Les commutateurs de caractères ne sont pas utilisés.",
"save-title": "Paramètres enregistrés",
"save-message": "Paramètres enregistrés\n\nSi vous souhaitez appliquer des modifications\nvous devez redémarrer l'application."
}
13 changes: 0 additions & 13 deletions src/settings.ini

This file was deleted.

0 comments on commit b9744e3

Please sign in to comment.