Skip to content

Commit

Permalink
[fix] Fix missing i18n keys when there are no mapped translations for…
Browse files Browse the repository at this point in the history
… the system's default locale
  • Loading branch information
vinifmor committed Dec 20, 2019
1 parent 6bd27b5 commit d2077de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [0.7.5] 2019-12-20
### Fixes
- Fix missing i18n keys when there are no mapped translations for the system's default locale [#40](https://github.com/vinifmor/bauh/issues/40)

## [0.7.4] 2019-12-09
### Improvements
- AUR
Expand Down
2 changes: 1 addition & 1 deletion bauh/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.7.4'
__version__ = '0.7.5'
__app_name__ = 'bauh'

import os
Expand Down
2 changes: 1 addition & 1 deletion bauh/view/util/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_locale_keys(key: str = None, locale_dir: str = resource.get_path('locale
break

if not locale_path:
return key, {}
return current_locale if current_locale else key, {}

with open(locale_path, 'r') as f:
locale_keys = f.readlines()
Expand Down

0 comments on commit d2077de

Please sign in to comment.