-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9cbebd
commit d777c75
Showing
11 changed files
with
203 additions
and
78 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
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,27 @@ | ||
""" | ||
Created on 2024-11-16 | ||
@author: wf | ||
""" | ||
|
||
import os | ||
|
||
import i18n | ||
|
||
|
||
class I18nConfig: | ||
""" | ||
Internationalization module configuration | ||
""" | ||
|
||
@classmethod | ||
def config(cls, debug: bool = False): | ||
module_path = os.path.dirname(os.path.abspath(__file__)) | ||
translations_path = os.path.join(module_path, "resources", "i18n") | ||
if debug: | ||
print(f"Loading translations from: {translations_path}") | ||
print(f"Files in directory: {os.listdir(translations_path)}") | ||
i18n.load_path.append(translations_path) | ||
i18n.set("filename_format", "{locale}.{format}") | ||
i18n.set("file_format", "yaml") | ||
i18n.set("fallback", "en") |
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,38 @@ | ||
# | ||
# CRM graph schema | ||
# | ||
# WF 2024-11-16 | ||
# | ||
node_id_type_name: str | ||
|
||
# | ||
# configuration of available node types | ||
# | ||
node_type_configs: | ||
NodeTypeConfig: | ||
label: NodeTypeConfig | ||
# https://fonts.google.com/icons?icon.set=Material+Icons | ||
icon: schema | ||
key_field: label | ||
dataclass_name: mogwai.schema.graph_schema.NodeTypeConfig | ||
display_name: Node Type | ||
display_order: 40 | ||
description: Configuration for a graph node type | ||
|
||
Organization: | ||
label: Organization | ||
icon: business | ||
key_field: name | ||
dataclass_name: crm.crm_core.Organization | ||
display_order: 10 | ||
display_name: Organization | ||
description: An Organization | ||
|
||
Person: | ||
label: Person | ||
icon: person | ||
key_field: name | ||
dataclass_name: crm.crm_core.Person | ||
display_order: 10 | ||
display_name: Person | ||
description: A person |
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,8 @@ | ||
# | ||
# Internationalization of crm | ||
# WF 2014-10-21 | ||
# | ||
de: | ||
person_list: "Personen" | ||
organization_list: "Organizationen" | ||
nodetypeconfig_list: "Knoten" |
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,8 @@ | ||
# | ||
# Internationalization for crm | ||
# WF 2014-10-21 | ||
# | ||
en: | ||
person_list: "Persons" | ||
organization_list: "Organizations" | ||
nodetypeconfig_list: "Nodes" |
This file was deleted.
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
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