Skip to content

Commit

Permalink
replace / and . to _
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Jan 9, 2025
1 parent d395e20 commit 21d6c13
Show file tree
Hide file tree
Showing 6 changed files with 1,094 additions and 1,088 deletions.
3 changes: 2 additions & 1 deletion build/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def __init__(self):
def set_generate_name(self, generate_name):
"""Set the generate name for the main element."""
self.generate_name = generate_name
self.id = "AST_LAYOUT_ATTRIBUTE_TYPE_" + generate_name.upper().replace(" ", "_").replace("-", "_").replace("__", "_")
idtok = generate_name.upper().replace(" ", "_").replace("-", "_").replace("/", "_").replace(".", "_").replace("__", "_")
self.id = "AST_LAYOUT_ATTRIBUTE_TYPE_" + idtok
return self

def set_type(self, type):
Expand Down
1 change: 0 additions & 1 deletion build/data/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@

for language in languages:
language["name"] = language["name"].lower().strip()

language["code"] = language["code"].lower().strip()

if __name__ == "__main__":
Expand Down
3 changes: 2 additions & 1 deletion build/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def set_is_mother(self, value):
def set_generate_name(self, generate_name):
"""Set the generate name for the main element."""
self.generate_name = generate_name
self.id = "AST_LAYOUT_TYPE_" + generate_name.upper().replace(" ", "_").replace("-", "_").replace("__", "_")
idtok = generate_name.upper().replace(" ", "_").replace("-", "_").replace("/", "_").replace(".", "_").replace("__", "_")
self.id = "AST_LAYOUT_TYPE_" + idtok

def set_text(self, language_code, text):
"""Set text for the main element."""
Expand Down
Loading

0 comments on commit 21d6c13

Please sign in to comment.