forked from JabRef/jabref
-
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
Showing
6 changed files
with
459 additions
and
261 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 |
---|---|---|
@@ -1,2 +1,6 @@ | ||
jq | ||
jq.exe | ||
|
||
# python | ||
*.pyc | ||
*$py.class |
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,23 @@ | ||
# Script usage | ||
|
||
The Script has following commands available | ||
- `$ python scripts/syncLang.py status [--extended]` | ||
- prints the current status to the terminal | ||
- `[--extended]` if the translations keys which create problems should be printed | ||
- usable with Gradle tasks | ||
- `$ gradle status` | ||
- `$ gradle statusExtended` | ||
|
||
|
||
- `$ python scripts/syncLang.py markdown` | ||
- Creates a markdown file of the current status and opens it | ||
- usable with Gradle tasks | ||
- `$ gradle statusWithMarkdown` | ||
|
||
|
||
- `$ python scripts/syncLang.py update [--extended]` | ||
- compares all the localization files against the English one and fixes unambiguous duplicates, removes obsolete keys, adds missing keys, and sorts them | ||
- `[--extended]` if the translations keys which create problems should be printed | ||
- usable with Gradle tasks | ||
- `$ gradle update` | ||
- `$ gradle updateExtended` |
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,29 @@ | ||
def enum(**enums): | ||
return type('Enum', (), enums) | ||
|
||
|
||
OUTPUT_COLORS = enum( | ||
OK='\033[0;32m', | ||
WARN='\033[0;33m', | ||
ERROR='\033[0;31m', | ||
ENDC='\033[0;38m' | ||
) | ||
|
||
|
||
def error(content): | ||
print "{color_error}{content}{color_end}" \ | ||
.format(color_error=OUTPUT_COLORS.ERROR, content=str(content), color_end=OUTPUT_COLORS.ENDC) | ||
|
||
|
||
def warn(content): | ||
print "{color_error}{content}{color_end}" \ | ||
.format(color_error=OUTPUT_COLORS.WARN, content=str(content), color_end=OUTPUT_COLORS.ENDC) | ||
|
||
|
||
def ok(content): | ||
print "{color_error}{content}{color_end}" \ | ||
.format(color_error=OUTPUT_COLORS.OK, content=str(content), color_end=OUTPUT_COLORS.ENDC) | ||
|
||
|
||
def neutral(content): | ||
print content |
Oops, something went wrong.