Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 62 localization of UI strings (#128)
* Issue-62: Localization of UI strings * generating POT file * integrated gettext calls into py and glade files * linting and testing * implemented a strings file
- Loading branch information
Showing
18 changed files
with
588 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,6 @@ dist | |
*.glade~ | ||
.coverage | ||
.env | ||
*.mo | ||
|
||
src/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[flake8] | ||
ignore = E402,W503 | ||
max-line-length = 120 | ||
i18nfuncs = gettext ngettext _ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[python: **.py] | ||
[glade: **.glade] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from locale import gettext as _ | ||
|
||
DEPLOY_ANCILLARY_CONFIRM_DIALOG_TITLE = _("Deploy Ancillary Trust Changes?") | ||
DEPLOY_ANCILLARY_CONFIRM_DIALOG_TEXT = _( | ||
"""Are you sure you wish to deploy your changes to the ancillary trust database? | ||
This will update the fapolicy trust and restart the service.""" | ||
) | ||
|
||
TRUSTED_FILE_MESSAGE = _("This file is trusted.") | ||
DISCREPANCY_FILE_MESSAGE = _("There is a discrepancy with this file.") | ||
UNKNOWN_FILE_MESSAGE = _("The trust status of this file is unknown.") | ||
|
||
SYSTEM_TRUST_TAB_LABEL = _("System Trust Database") | ||
ANCILLARY_TRUST_TAB_LABEL = _("Ancillary Trust Database") | ||
|
||
FILE_LIST_TRUST_HEADER = _("Trust") | ||
FILE_LIST_FILE_HEADER = _("File") | ||
|
||
ADD_FILE_BUTTON_LABEL = _("Add File") | ||
|
||
WHITESPACE_WARNING_DIALOG_TITLE = _("File path(s) contains embedded whitespace.") | ||
WHITESPACE_WARNING_DIALOG_TEXT = _( | ||
"fapolicyd currently does not support paths containing spaces. The following paths will not be added to the " | ||
+ "Trusted Files List.\n(fapolicyd: V TBD)\n\n" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from inspect import currentframe | ||
|
||
|
||
def f(formatString): | ||
frame = currentframe().f_back | ||
return eval(f'f"""{formatString}"""', frame.f_locals, frame.f_globals) |
Oops, something went wrong.