CMakeL10n: Avoid option --use-first for calls msguniq and msgcat #76

Merged
SlavekB merged 1 commits from feat/CMakeL10n-avoid-gettext-use-first into master 3 years ago
Owner

Using the --use-first option causes that comments and location information is used only from the first occurrence and all others are discarded instead of merging this information together.

When the information are merged, the gettext inserts an ugly comment that referring to the POT file from which the information comes from. These in our case are commonly temporary files and therefore such information is not only ugly, but at the same time unnecessary. That's why I added the removal of this ugly comment.

Using the `--use-first` option causes that comments and location information is used only from the first occurrence and all others are discarded instead of merging this information together. When the information are merged, the gettext inserts an ugly comment that referring to the POT file from which the information comes from. These in our case are commonly temporary files and therefore such information is not only ugly, but at the same time unnecessary. That's why I added the removal of this ugly comment.
SlavekB added 1 commit 3 years ago
81bf77f130
CMakeL10n: Avoid option --use-first for calls msguniq and msgcat
SlavekB changed title from CMakeL10n: Avoid option --use-first for calls msguniq and msgcat to WIP: CMakeL10n: Avoid option --use-first for calls msguniq and msgcat 3 years ago
Poster
Owner

It seems that it is good for use with msguniq with POT for desktop files, but it is not possible to use with msgcat when connecting other POT files. I have to do more tests.

It seems that it is good for use with `msguniq` with POT for desktop files, but it is not possible to use with `msgcat` when connecting other POT files. I have to do more tests.
SlavekB added the PR/wip label 3 years ago
SlavekB force-pushed feat/CMakeL10n-avoid-gettext-use-first from 81bf77f130 to 3ec8bd7bf6 3 years ago
Poster
Owner

The problem for joining the POT files represents POT header. I adjusted the code so that instead of using msgcat call, files are joined in CMake code and then are removed all repeats of the POT header. As a result, I did simplify the code so that a single msguniq call is now used.

Note: Because call of msguniq is now always performed as part of the POT file finalization and at the time when the working extension of the file names is cleaned in references to source files, this can lead to changes of the line breaks in POT files. If you do tests of this PR, you can observe such changes in POT files.

The problem for joining the POT files represents POT header. I adjusted the code so that instead of using `msgcat` call, files are joined in CMake code and then are removed all repeats of the POT header. As a result, I did simplify the code so that a single `msguniq` call is now used. Note: Because call of `msguniq` is now always performed as part of the POT file finalization and at the time when the working extension of the file names is cleaned in references to source files, this can lead to changes of the line breaks in POT files. If you do tests of this PR, you can observe such changes in POT files.
SlavekB changed title from WIP: CMakeL10n: Avoid option --use-first for calls msguniq and msgcat to CMakeL10n: Avoid option --use-first for calls msguniq and msgcat 3 years ago
SlavekB removed the PR/wip label 3 years ago
SlavekB force-pushed feat/CMakeL10n-avoid-gettext-use-first from 3ec8bd7bf6 to b37ccb9671 3 years ago
SlavekB force-pushed feat/CMakeL10n-avoid-gettext-use-first from b37ccb9671 to 7eac0a0f68 3 years ago
SlavekB merged commit 7eac0a0f68 into master 3 years ago
SlavekB deleted branch feat/CMakeL10n-avoid-gettext-use-first 3 years ago
SlavekB added this to the R14.0.11 release milestone 3 years ago
The pull request has been merged as 7eac0a0f68.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Reference: TDE/tde-cmake#76
Loading…
There is no content yet.