Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ If you want to use a different Crowdin project, store the project and file IDs i
- Required: `xliffPath` — path to the source XLIFF file; `mdPath` — path for the resulting Markdown file.
- Optional: `-u`/`--untranslated` — produce the untranslated version of the Markdown file.

- `md2xliff` - Convert a Markdown file to XLIFF.
- Required: `mdPath` — path to the Markdown file; `xliffPath` — path for the resulting XLIFF file.
- `md2html` - Convert a Markdown file to HTML.
- Required: `mdPath` — path to the Markdown file; `htmlPath` — path for the resulting HTML file.
- Optional: `-l`/`--lang` — language code (default: `en`); `-t`/`--docType` — document type, one of `userGuide`, `developerGuide`, `changes`, `keyCommands`.
Expand Down
8 changes: 8 additions & 0 deletions source/l10nUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,9 @@ def main():
)
command_xliff2md.add_argument("xliffPath", help="Path to the xliff file")
command_xliff2md.add_argument("mdPath", help="Path to the resulting markdown file")
command_md2xliff = commands.add_parser("md2xliff", help="Convert markdown to xliff")
command_md2xliff.add_argument("mdPath", help="Path to the markdown file")
command_md2xliff.add_argument("xliffPath", help="Path to the resulting xliff file")
command_md2html = commands.add_parser("md2html", help="Convert markdown to html")
command_md2html.add_argument(
"-l",
Expand Down Expand Up @@ -1058,6 +1061,11 @@ def main():
outputPath=args.mdPath,
translated=not args.untranslated,
)
case "md2xliff":
markdownTranslate.generateXliff(
mdPath=args.mdPath,
outputPath=args.xliffPath,
)
case "md2html":
md2html.main(
source=args.mdPath,
Expand Down
Loading
Loading