mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #10503 from AA-Turner/gettext-catalogue-fix
`gettext`: Ensure positions always sort
This commit is contained in:
commit
433c67effc
@ -53,7 +53,10 @@ class Catalog:
|
||||
if msg not in self.metadata: # faster lookup in hash
|
||||
self.messages.append(msg)
|
||||
self.metadata[msg] = []
|
||||
self.metadata[msg].append((origin.source, origin.line, origin.uid)) # type: ignore
|
||||
line = origin.line
|
||||
if line is None:
|
||||
line = -1
|
||||
self.metadata[msg].append((origin.source, line, origin.uid)) # type: ignore
|
||||
|
||||
def __iter__(self) -> Generator[Message, None, None]:
|
||||
for message in self.messages:
|
||||
|
Loading…
Reference in New Issue
Block a user