Skip to content
Open
Show file tree
Hide file tree
Changes from all 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: 1 addition & 1 deletion CommcareTranslationChecker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
r'(^### [\S]+)', # Format tag for heading 3
r'(^#### [\S]+)', # Format tag for heading 4
r'(^##### [\S]+)', # Format tag for heading 5
r'(^###### [\S]+)', # Format tag for heading 1
r'(^###### [\S]+)', # Format tag for heading 6
r'(^\* [\S]+)', # Format tag for unordered lists
r'(^[0-9]+. [\S]+)' # Format tag for ordered lists
]
Expand Down
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,39 @@ https://pypi.python.org/pypi/CommcareTranslationChecker

6\. Create a release on github

https://github.com/dimagi/CommcareTranslationChecker/releases
https://github.com/dimagi/CommcareTranslationChecker/releases


#Usage:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after #


## Mismatch Types
There are two types of mismatches:
1. Output tag mismatch
This happens when the output tags in base language text and the translated text does not match i.e. when the output tags are missing or in the wrong order.
These mismatches are highlighted in **red** color.
2. Formatting or markdown mismatch
This happens when there are formatting or markdown mismatches. Formatting mismatches happen when the non linguistic characters of base language text does not match with the translated text. Markdown mismatches happen when the markdown in base language text does not match with the markdown in translated text.
These mismatches are highlighted in **yellow** color.

####Examples of formatting mismatch:
* base language has special chars but translated language does not
* base language does not have special chars but translated language does
* markdown syntax issues, like a missing asterisk of pound




## Columns added in Output Excel Sheet
This tool adds additional columns in output excel sheet.
* **mismatch flag** column indicates whether there is a mismatch. *Y* indicates a mismatch, and *N* indicates a no mismatch.
* A **fix_default_<translated_language>** column is added for every translated columns. A language column starts with default_. If no base language is specified, the first column is considered as base column and remaining columns are considered as translated columns and a fix_default_<translated_language> column is added. If any fix is applied, this column contains the corrected text.

## Suggestions on possible fixes
* Output Tag mismatches
* If there is any output tag in translated text not present in base text, removes the output tags in translated text.
* If there are two output tags and they are out of order in translated text, the tool swaps their positions if ignore order flag is not set

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the ignore order flag set by default on the feature incorporated in HQ?

* Formatting and markdown mismatches
* This tool fixes markdown issues with
* Headings (level 1 to 6),
* Ordered Lists
* Unordered Lists
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akshita-sh can you please review this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add Untranslated text in the translated column as an addition to possible fixes. https://dimagi-dev.atlassian.net/browse/ICDS-1709.

Though I haven't yet used the script, app team members who have, have more suggestions on improvements which we plan to take up later. I think once the use of this script is much more familiar in the app, the corresponding confluence page can have examples as well in the documentation. Right now the documentation is very brief. For now, though it looks fine.