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

Russian translation (ru.yaml): extra "Author" definition causes Pandoc to not load translation #5334

Closed
gdg-work opened this issue Feb 27, 2019 · 2 comments · Fixed by #5335

Comments

@gdg-work
Copy link

Found a possible bug in translations.

Description:

There is an Author: field in Russian translations file <DATADIR>/translations/ru.yaml.
This field causes Pandoc to not load translation table with warnings like:

[WARNING] The term Table has no translation defined.
[WARNING] The term Figure has no translation defined.

Corresponding terms are never appear in the output. Figures' and tables' captions
are just 1. A table caption instead of Таблица 1. A table caption.

Solution:

Remove this 'Author' translation table item.

As I can see, this problem presents in uk.yaml file, too.

(non-working) example:

# Table example

|  1 | 2  |  3 |
|---:|:--:|:---|
| first | second | third |

Table: A sample table

# Figure example

![A sample figure with online image][fig1]

[fig1]: https://www.clipartmax.com/png/small/6-65037_cartoon-space-ship-space-shuttle-clip-art.png "Space ship"

A sample figure

Pandoc command line and STDERR:

$ pandoc -t odt -V lang=ru-RU --metadata lang:ru-RU -o /tmp/t.odt -f markdown+implicit_figures t.md
[WARNING] Could not load translations for ru-RU
  translations/ru.yaml: expected Term instead of !!str
[WARNING] The term Table has no translation defined.
[WARNING] The term Figure has no translation defined.

Problem presents itself with ODT output.

Result:

image

Expected: 'Таблица' before number in table caption and 'Рис.' before number in figure caption.

@gdg-work
Copy link
Author

Pandoc version:
pandoc 2.6
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2, skylighting 0.7.5

@mb21
Copy link
Collaborator

mb21 commented Feb 27, 2019

Indeed, Author is not in the list of Terms anymore: https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Translations.hs#L61

So we should remove it from the uk.yaml and ru.yaml files: https://github.com/jgm/pandoc/search?l=YAML&q=Author

mb21 added a commit to mb21/pandoc that referenced this issue Feb 27, 2019
@jgm jgm closed this as completed in #5335 Feb 27, 2019
jgm pushed a commit that referenced this issue Feb 27, 2019
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

Successfully merging a pull request may close this issue.

2 participants