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

Versioning #22

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

Versioning #22

marsiliano opened this issue Sep 16, 2020 · 5 comments
Assignees

Comments

@marsiliano
Copy link

marsiliano commented Sep 16, 2020

Different revisions of the ts files

I spend a lot of time, updating the master language excel files, it would be nice, If I could choose to update an excel files, based on updated ts files.

Remove unused sources and translations

Add an option to remove translations that are not used anymore, removing the translations from the excel files

@guerinoni
Copy link
Owner

@marsiliano
Do you want some merge tool for excel? I mean, you give a ts + xlsx file as an input and you wanna get only updated xlsx file?

@marsiliano
Copy link
Author

Yes, a smart merger, I would like to have an option, on which I can choose to remove obsolete strings

@guerinoni
Copy link
Owner

Mmmm I'm sure about this... How can I choose the last updated item? The file last edited? The ts is the first choice??

@marsiliano
Copy link
Author

Yes, the ts is always the first choice, since it has been updated using lupdate, we can split the input and the output file. Of course it's not PIBCAK proof, but in case of error, the generation could be repeated

@joernweissenborn
Copy link

Hmm, I think this is the wrong approach to update a file, since the assumption is that the input data is the single source of truth.

So basically you will get in the end the same result as if you would have just overwrite with a created file. At least for the ts->excel case.

With the excel-> ts case, it also doesn't matter if you just overwrite it (as long that meta-data like language is preserved, see #24). Even if the the file is outdated, you can use lupdate to update is or lrelease directly.

But in the end, I see only two reasons why one might want to update an excel file:

  • preserve formatting -> you can export to csv and simply import it into a preformatted table
  • preserve extra fields per translation unit -> not a good idea, there should be nothing in the table which cannot be mapped back to the ts

My final thought is that "smart" excel merging can never work with arbitrary excel. This things you always have to script in some way. Before finding this package I used a small python script with pandas excel interface to the ts->xls, but I am sure you can use it to automate updating your master file.

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

No branches or pull requests

3 participants