-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding save functionality to scripts inside build/data/tags and build…
…/data/styles
- Loading branch information
Showing
18 changed files
with
364 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
[ | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_FIRST_BASELINE", | ||
"generate_name": "first baseline", | ||
"text": { | ||
"EN": [ | ||
"first baseline" | ||
], | ||
"FA": [ | ||
"اول خط پایه" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_BASELINE_FIRST", | ||
"generate_name": "baseline first", | ||
"text": { | ||
"EN": [ | ||
"baseline first" | ||
], | ||
"FA": [ | ||
"خط پایه اول" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_LAST_BASELINE", | ||
"generate_name": "last baseline", | ||
"text": { | ||
"EN": [ | ||
"last baseline" | ||
], | ||
"FA": [ | ||
"آخر خط پایه" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_BASELINE_LAST", | ||
"generate_name": "baseline last", | ||
"text": { | ||
"EN": [ | ||
"baseline last" | ||
], | ||
"FA": [ | ||
"خط پایه آخر" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_BASELINE", | ||
"generate_name": "baseline", | ||
"text": { | ||
"EN": [ | ||
"baseline" | ||
], | ||
"FA": [ | ||
"خط پایه" | ||
] | ||
} | ||
} | ||
] |
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,26 @@ | ||
[ | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_SAFE", | ||
"generate_name": "safe", | ||
"text": { | ||
"EN": [ | ||
"safe" | ||
], | ||
"FA": [ | ||
"امن" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_UNSAFE", | ||
"generate_name": "unsafe", | ||
"text": { | ||
"EN": [ | ||
"unsafe" | ||
], | ||
"FA": [ | ||
"نامناسب" | ||
] | ||
} | ||
} | ||
] |
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,86 @@ | ||
[ | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_CENTER", | ||
"generate_name": "center", | ||
"text": { | ||
"EN": [ | ||
"center" | ||
], | ||
"FA": [ | ||
"وسط" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_START", | ||
"generate_name": "start", | ||
"text": { | ||
"EN": [ | ||
"start" | ||
], | ||
"FA": [ | ||
"شروع" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_END", | ||
"generate_name": "end", | ||
"text": { | ||
"EN": [ | ||
"end" | ||
], | ||
"FA": [ | ||
"پایان" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_SELF_START", | ||
"generate_name": "self-start", | ||
"text": { | ||
"EN": [ | ||
"self-start" | ||
], | ||
"FA": [ | ||
"شروع خود" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_SELF_END", | ||
"generate_name": "self-end", | ||
"text": { | ||
"EN": [ | ||
"self-end" | ||
], | ||
"FA": [ | ||
"پایان خود" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_FLEX_START", | ||
"generate_name": "flex-start", | ||
"text": { | ||
"EN": [ | ||
"flex-start" | ||
], | ||
"FA": [ | ||
"شروع فلکس" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "AST_LAYOUT_ATTRIBUTE_VALUE_TYPE_FLEX_END", | ||
"generate_name": "flex-end", | ||
"text": { | ||
"EN": [ | ||
"flex-end" | ||
], | ||
"FA": [ | ||
"پایان فلکس" | ||
] | ||
} | ||
} | ||
] |
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 |
---|---|---|
@@ -1,7 +1,21 @@ | ||
import sys | ||
from pathlib import Path | ||
|
||
parent_dir = Path(__file__).resolve().parent.parent.parent | ||
sys.path.append(str(parent_dir)) | ||
|
||
from lang import Lang | ||
from value import Value | ||
from prebuild import Prebuild | ||
|
||
crossorigins = [ | ||
Value().set_generate_name("anonymous").add_text(Lang.EN, "anonymous").add_text(Lang.FA, "ناشناس"), | ||
Value().set_generate_name("use-credentials").add_text(Lang.EN, "use credentials").add_text(Lang.FA, "یوز کرید"), | ||
] | ||
|
||
if __name__ == '__main__': | ||
strings = Prebuild.to_string( | ||
[value.to_dict() for value in crossorigins] | ||
) | ||
Prebuild.print(strings) | ||
Prebuild.save(strings, __file__) |
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,7 +1,21 @@ | ||
import sys | ||
from pathlib import Path | ||
|
||
parent_dir = Path(__file__).resolve().parent.parent.parent | ||
sys.path.append(str(parent_dir)) | ||
|
||
from lang import Lang | ||
from value import Value | ||
from prebuild import Prebuild | ||
|
||
dirs = [ | ||
Value().set_generate_name("ltr").add_text(Lang.EN, "ltr").add_text(Lang.EN, "left").add_text(Lang.FA, "چپ به راست").add_text(Lang.FA, "چپ"), | ||
Value().set_generate_name("rtl").add_text(Lang.EN, "rtl").add_text(Lang.EN, "right").add_text(Lang.FA, "راست به چپ").add_text(Lang.FA, "راست"), | ||
] | ||
|
||
if __name__ == '__main__': | ||
strings = Prebuild.to_string( | ||
[value.to_dict() for value in dirs] | ||
) | ||
Prebuild.print(strings) | ||
Prebuild.save(strings, __file__) |
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
Oops, something went wrong.