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

Missing Language setting inside generated Ts files #24

Open
marsiliano opened this issue Sep 16, 2020 · 7 comments
Open

Missing Language setting inside generated Ts files #24

marsiliano opened this issue Sep 16, 2020 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@marsiliano
Copy link

Missing Language setting inside Ts files

When opening the ts file generated with Qt Linguist, the tool requires to select the translations language

To Reproduce
Steps to reproduce the behavior:

  1. Generate a ts file with qTsConverter
  2. Open the ts file with Qt Linguist
  3. A prompt for the language selection appears

Expected behavior

The language is selected from the language code (e.g.: en_GB)

@guerinoni guerinoni added the bug Something isn't working label Sep 16, 2020
@joernweissenborn
Copy link

joernweissenborn commented Jul 4, 2021

@guerinoni : You could add it as a kind of header. the xlsx files have to have your format anyway, so just reserve first row and put the language info there.

@guerinoni
Copy link
Owner

Yes, maybe is better to set it as header :)

@joernweissenborn
Copy link

joernweissenborn commented Aug 10, 2021

@guerinoni Did you got around implementing this? There might be problems with "old" format, but you can add switch to tell it to not look for header.

Having the language in the output is really useful, since lupdate uses it to e.g. remove plurals and stuff.

@guerinoni
Copy link
Owner

Now is not exported the language from original .ts... Maybe I can add it to the header and all should work as well...
What do you think? @joernweissenborn

@joernweissenborn
Copy link

Now is not exported the language from original .ts... Maybe I can add it to the header and all should work as well...
What do you think? @joernweissenborn

I think you should put in a header.

As first item in the header row you should put the the qtsconverter version. So you can update in the future and check if it's a format prior to change when the first header Item is msg id or so.

If you find a version there you simply subtract the header and get eg language out of the second column of the harder row. You feed the rest in the current converter and extend it to take language as argument and put it in the resulting TS.

I did not dived deeply in your code yet so I am not sure how hard it is. The xlsx header processing should be easy. Not sure how hard it is to tell the XML engine to put the language tag.

@guerinoni
Copy link
Owner

@joernweissenborn merged a feature that allows to save and use TS version... This works prepare for future feature because now there is an header for "general config"... It will available from version of qTsConverter 4.5.0... I will release it in next days
:D

@joernweissenborn
Copy link

Cool stuff. I will check it out soon because I am now at a point where I have my CI ready for automating this kind of things. When I am done I will share an example how to use qtsconverter in a modern automated workflow.

Thanks again for your great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants