Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate import report for source language #112

Open
icnocop opened this issue Mar 9, 2019 · 3 comments · May be fixed by #115
Open

Generate import report for source language #112

icnocop opened this issue Mar 9, 2019 · 3 comments · May be fixed by #115

Comments

@icnocop
Copy link
Contributor

icnocop commented Mar 9, 2019

Hi.

When I run serge import --dry-run for example, a report for the source language is not generated.
A report for the destination languages are generated without issues.

source_language             en
destination_languages       zh-Hans zh-Hant fr de it ja ko pt ru es tr
Saving reports:
	serge-import-report-de.html... Done
	serge-import-report-es.html... Done
	serge-import-report-fr.html... Done
	serge-import-report-it.html... Done
	serge-import-report-ja.html... Done
	serge-import-report-ko.html... Done
	serge-import-report-pt.html... Done
	serge-import-report-ru.html... Done
	serge-import-report-tr.html... Done
	serge-import-report-zh-Hans.html... Done
	serge-import-report-zh-Hant.html... Done

Statistics:
---------------    -----    -------    --------    ------
Language           Files    Notices    Warnings    Errors
---------------    -----    -------    --------    ------
source language    17                              401   
de                 17       2680       111         290   
es                 17       2680       111         290   
fr                 17       2680       111         290   
it                 17       2680       111         290   
ja                 17       2680       111         290   
ko                 17       2680       111         290   
pt                 17       2680       111         290   
ru                 17       2680       111         290   
tr                 17       2680       111         290   
zh-Hans            17       2680       111         290   
zh-Hant            17       2680       111         290   
---------------    -----    -------    --------    ------

I expected a report to be generated for the source language so I can more easily read through the errors it reported.

Ex. ERROR: Duplicate key 'MY_DUPLICATE_KEY' found in source file

Thank you.

@icnocop icnocop changed the title generate import report for source language Generate import report for source language Mar 9, 2019
@icnocop icnocop linked a pull request Mar 13, 2019 that will close this issue
@iafan
Copy link
Contributor

iafan commented Mar 14, 2019

I expected a report to be generated for the source language so I can more easily read through the errors it reported.

Can you elaborate on that? The purpose of the report is to show the alignment between source and each target language. What would you you expect to see in the report that only shows the source strings?

@icnocop
Copy link
Contributor Author

icnocop commented Mar 14, 2019

When I run the import, the statistics show 401 errors in the source language and a different number of errors in each of the target languages.
All the errors in the source language indicate SERGE_ERROR_DUPLICATE_KEY.

That report is different than the report for each of the target languages.
For example, the statistics for one of the target languages:
SERGE_ERROR_MULTIPLE_TRANSLATIONS | 306
SERGE_WARNING_DUPLICATE_KEY | 96
SERGE_WARNING_UNKNOWN_KEY | 2
SERGE_NOTICE_SAME_TRANSLATION | 550

The fact that the import indicates errors in the source language, generating a report with those errors in one place that can be easily read makes sense to me, especially because they're different than what's reported in each of the target languages.

It seems I should try to resolve the errors and warnings reported in both the source and target languages, before actually doing the import.

@icnocop
Copy link
Contributor Author

icnocop commented Mar 14, 2019

Now with #115:

Saving reports:
        serge-import-report-de.html... Done
        serge-import-report-en.html... Done
        serge-import-report-es.html... Done
        serge-import-report-fr.html... Done
        serge-import-report-it.html... Done
        serge-import-report-ja.html... Done
        serge-import-report-ko.html... Done
        serge-import-report-pt.html... Done
        serge-import-report-ru.html... Done
        serge-import-report-tr.html... Done
        serge-import-report-zh-Hans.html... Done
        serge-import-report-zh-Hant.html... Done

Statistics:
--------------------    -----    -------    --------    ------
Language                Files    Notices    Warnings    Errors
--------------------    -----    -------    --------    ------
de                      17       568        107         296
en (source language)    17                              401
es                      17       550        98          306
fr                      17       544        107         297
it                      17       567        109         296
ja                      15       522        114         291
ko                      15       521        112         290
pt                      15       572        110         296
ru                      15       513        113         292
tr                      15       511        99          304
zh-Hans                 15       518        100         302
zh-Hant                 15       453        100         304
--------------------    -----    -------    --------    ------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants