Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ZNTA-2247): Remove magic numbers for glossary csv columns (#592)
* fix(ZNTA-2247): Remove magic numbers for glossary csv columns Still expects column 0 to be the source locale, but checks that the PoS and Description columns are named. This prevents garbage in said fields. This change also prevents repeatedly setting these fields, only doing so once per row. * fix(ZNTA-2247): Allow several synonyms for data fields Fix invalid test, contradicting the specified behaviour. * fix(ZNTA-2247): Add docs and improve code as per review
- Loading branch information
1 parent
33802a3
commit 89a9521
Showing
5 changed files
with
78 additions
and
45 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
2 changes: 1 addition & 1 deletion
2
common/zanata-adapter-glossary/src/test/resources/glossary/translate1.csv
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,3 +1,3 @@ | ||
"en-US","es","zh","pos","description" | ||
"Hello","Hola","您好","noun","testing of hello csv" | ||
"Hello","Hola","您好","verb","testing of hello csv" | ||
"Morning","mañana","上午","noun","testing of morning csv" |
6 changes: 3 additions & 3 deletions
6
common/zanata-adapter-glossary/src/test/resources/glossary/translate2.csv
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,3 +1,3 @@ | ||
"en-US","es","zh","description1","description2" | ||
"Hello","Hola","您好","testing of hello csv1","testing of hello csv2" | ||
"Morning","mañana","上午","testing of morning csv1","testing of morning csv2" | ||
"en-US","es","zh","definition","synonyms","partofspeech" | ||
"Hello","Hola","您好","testing of hello csv","Hi","verb" | ||
"Morning","mañana","上午","testing of morning csv","Dawn,AM","noun" |
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