Skip to content

Commit

Permalink
Fix some syntax errors in py, and update jsons
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Jan 9, 2025
1 parent 5fda885 commit b207396
Show file tree
Hide file tree
Showing 9 changed files with 335 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build/tags/area.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
Value().set_generate_name("rect").add_text(Lang.EN, "rect").add_text(Lang.FA, "مربع"),
Value().set_generate_name("circle").add_text(Lang.EN, "circle").add_text(Lang.FA, "دایره"),
Value().set_generate_name("poly").add_text(Lang.EN, "poly").add_text(Lang.FA, "چند گونه"),
) \
]) \

element.add_attribute() \
.set_generate_name("target") \
Expand All @@ -117,7 +117,7 @@
.set_all_text(mediatype["code"]) \
.set_all_text(mediatype["name"]) \
for mediatype in mediatypes.mediatypes
])
]) \

element_dict = element.to_dict()

Expand Down
2 changes: 1 addition & 1 deletion build/tags/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
Value().set_generate_name("auto").add_text(Lang.EN, "auto").add_text(Lang.FA, "خودکار"),
Value().set_generate_name("metadata").add_text(Lang.EN, "metadata").add_text(Lang.FA, "داده"),
Value().set_generate_name("none").add_text(Lang.EN, "none").add_text(Lang.FA, "پیشفرض"),
) \
]) \

element.add_attribute() \
.set_generate_name("src") \
Expand Down
4 changes: 2 additions & 2 deletions build/tags/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
Value().set_generate_name("hide").add_text(Lang.EN, "hide").add_text(Lang.FA, "مخفی"),
Value().set_generate_name("show").add_text(Lang.EN, "show").add_text(Lang.FA, "نمایش"),
Value().set_generate_name("toggle").add_text(Lang.EN, "toggle").add_text(Lang.FA, "متغیر بودن"),
) \
]) \

element.add_attribute() \
.set_generate_name("name") \
Expand All @@ -110,7 +110,7 @@
Value().set_generate_name("button").add_text(Lang.EN, "button").add_text(Lang.FA, "دکمه"),
Value().set_generate_name("reset").add_text(Lang.EN, "reset").add_text(Lang.FA, "ریست"),
Value().set_generate_name("submit").add_text(Lang.EN, "submit").add_text(Lang.FA, "ارسال"),
) \
]) \

element.add_attribute() \
.set_generate_name("value") \
Expand Down
3 changes: 1 addition & 2 deletions build/tags/iframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,14 @@
.add_reserve_values([
Value().set_generate_name("eager").add_text(Lang.EN, "eager").add_text(Lang.FA, "مشتاق"),
Value().set_generate_name("lazy").add_text(Lang.EN, "lazy").add_text(Lang.FA, "لیزی"),
])
]) \

element.add_attribute() \
.set_generate_name("name") \
.set_type(Type.AnyNoEmpty) \
.add_text(Lang.EN, "name") \
.add_text(Lang.FA, "نام") \


element.add_attribute() \
.set_generate_name("referrerpolicy") \
.set_type(Type.AnyNoEmpty) \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/img.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
.add_reserve_values([
Value().set_generate_name("eager").add_text(Lang.EN, "eager").add_text(Lang.FA, "مشتاق"),
Value().set_generate_name("lazy").add_text(Lang.EN, "lazy").add_text(Lang.FA, "لیزی"),
])
]) \

element.add_attribute() \
.set_generate_name("longdesc") \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
.add_reserve_values([
Value().set_generate_name("eager").add_text(Lang.EN, "eager").add_text(Lang.FA, "مشتاق"),
Value().set_generate_name("lazy").add_text(Lang.EN, "lazy").add_text(Lang.FA, "لیزی"),
])
]) \

element.add_attribute() \
.set_generate_name("longdesc") \
Expand Down
2 changes: 1 addition & 1 deletion build/tags/ol.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
Value().set_generate_name("a").set_all_text("a"),
Value().set_generate_name("A").set_all_text("A"),
Value().set_generate_name("1").set_all_text("1"),
])
]) \

element_dict = element.to_dict()

Expand Down
139 changes: 139 additions & 0 deletions build/tags/th.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"id": "AST_LAYOUT_TYPE_TH",
"is_mother": true,
"generate_name": "th",
"text": {
"EN": [
"th"
],
"FA": [
"تی اچ"
]
},
"attributes": [
{
"id": "AST_LAYOUT_ATTRIBUTE_TYPE_ABBR",
"generate_name": "abbr",
"type": "AST_TYPE_ANY",
"text": {
"EN": [
"abbr"
],
"FA": [
"ای بی بی ار"
]
},
"is_required": false,
"reserved_values": []
},
{
"id": "AST_LAYOUT_ATTRIBUTE_TYPE_COLSPAN",
"generate_name": "colspan",
"type": "AST_TYPE_NUMBER_POSITIVE",
"text": {
"EN": [
"colspan"
],
"FA": [
"کول اسپن"
]
},
"is_required": false,
"reserved_values": []
},
{
"id": "AST_LAYOUT_ATTRIBUTE_TYPE_HEADERS",
"generate_name": "headers",
"type": "AST_TYPE_ANY",
"text": {
"EN": [
"headers"
],
"FA": [
"هدر"
]
},
"is_required": false,
"reserved_values": []
},
{
"id": "AST_LAYOUT_ATTRIBUTE_TYPE_ROWSPAN",
"generate_name": "rowspan",
"type": "AST_TYPE_NUMBER_POSITIVE",
"text": {
"EN": [
"rowspan"
],
"FA": [
"رو اسپن"
]
},
"is_required": false,
"reserved_values": []
},
{
"id": "AST_LAYOUT_ATTRIBUTE_TYPE_SCOPE",
"generate_name": "scope",
"type": "AST_TYPE_STRING",
"text": {
"EN": [
"scope"
],
"FA": [
"اسکوپ"
]
},
"is_required": false,
"reserved_values": [
{
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_COL",
"generate_name": "col",
"text": {
"EN": [
"col"
],
"FA": [
"ستون"
]
}
},
{
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_COLGROUP",
"generate_name": "colgroup",
"text": {
"EN": [
"colgroup"
],
"FA": [
"گروه ستون"
]
}
},
{
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_ROW",
"generate_name": "row",
"text": {
"EN": [
"row"
],
"FA": [
"ردیف"
]
}
},
{
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_ROWGROUP",
"generate_name": "rowgroup",
"text": {
"EN": [
"rowgroup"
],
"FA": [
"گروه ردیف"
]
}
}
]
}
]
}
Loading

0 comments on commit b207396

Please sign in to comment.