Support no obsolete option#65
Merged
shimizukawa merged 5 commits intoApr 19, 2024
Merged
Conversation
Provide a unit test to validate the usage of the `--line-width` option. Signed-off-by: James Knight <james.d.knight@live.com>
The following tweaks the catalog wrapper commands used to call babel's `pofile`/`mofile` functions to support forwarding any keyword argument. This can provide flexibility to callers which may wish to utilize additional options provided by babel, without needing to add an explicit option in the catalog wrapper calls. A compatibility adjustment was added to `dump_po` to help map an original argument `line_width` to babel's `width` argument. This is to ensure callers which still use the `line_width` argument can appropriately configure the babel call to impose the provided width. Signed-off-by: James Knight <james.d.knight@live.com>
Signed-off-by: James Knight <james.d.knight@live.com>
Adds support for a `--no-obsolete` option to allow the automatic exclusion of obsolete messages (`#~ `) from updated sources. This utilizes babel's `ignore_obsolete` option to not produce obsolete in a final pot file. The `--no-obsolete` argument was chosen to mimic the same argument naming as seen in `msgattrib` [1]. [1]: https://www.gnu.org/software/gettext/manual/html_node/msgattrib-Invocation.html Signed-off-by: James Knight <james.d.knight@live.com>
Signed-off-by: James Knight <james.d.knight@live.com>
Member
|
@jdknight Thank you for your contribution. Sorry it took so long to merge. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following series of commits aims to bring support for a
--no-obsoleteoption for a sphinx-intl update request. This option allows a caller to automatically drop/ignore obsolete messages processed from any updated documents (mimicking a--no-obsoleteoption found in msgattrib).This commit stacks first adds a unit test to verify the existing line-width option. This is to not only help verify this option for long-term use, but ensure/present that the catalog changes presented in this pull request do not break its functionality. The "no obsolete" feature then follows the same style of configuring/utilizing the respective babel catalog option, as done with the line-width feature.
This pull request may make #61 obsolete with the introduction of e5e1870; however, it is unknown if the
sort_by_message_locationproxy argument for babel'ssort_by_fileis required for its use case.