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

Could we avoid abbr for translation purpose? #1284

Closed
HidenoriKobayashi opened this issue Oct 2, 2023 · 4 comments · Fixed by #1310
Closed

Could we avoid abbr for translation purpose? #1284

HidenoriKobayashi opened this issue Oct 2, 2023 · 4 comments · Fixed by #1310
Labels
bug Something isn't working

Comments

@HidenoriKobayashi
Copy link
Collaborator

The <abbr> tags seem not work well for our translations. These are the two problems that I face now while translating src/bare-metal/microcontrollers/probe-rs.md.

  • One sentence is chopped into small chunks. This makes it difficult to translate into a language that has different ordering constraints and does not use space characters as in English. (For example, it would be much easier if this is part of a whole sentence:
    #: src/bare-metal/microcontrollers/probe-rs.md:6
    )
  • It seems the paragraph separation/structure got confused. For example, the paragaph starting with "`cargo-embed` is a cargo ..." cannot be separated from the bullet list above it. What I see is the first word (cargo-embed\) being appended to the last item (Cargo integration).

I confirmed that removing those tags and appending the non-abbreviation in parentheses solves the above. An example would be:

-* <abbr title="Serial Wire Debug">SWD</abbr> and JTAG via CMSIS-DAP, ST-Link and J-Link probes
-* GDB stub and Microsoft <abbr title="Debug Adapter Protocol">DAP</abbr> server
+* SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes
+* GDB stub and Microsoft DAP (Debug Adapter Protocol) server
@mgeisler
Copy link
Collaborator

mgeisler commented Oct 2, 2023

Hi @HidenoriKobayashi, I would suggest that we don't add the <abbr> tag as well: we're writing Markdown, not HTML :-)

Could you make a PR to remove all such tags?

  • It seems the paragraph separation/structure got confused. For example, the paragaph starting with "cargo-embed is a cargo ..." cannot be separated from the bullet list above it. What I see is the first word (cargo-embed\) being appended to the last item (Cargo integration).

This sounds like a bug in https://github.com/google/mdbook-i18n-helpers — can I get you to open an issue with it there? Then we'll see about fixing it as soon as possible.

@mgeisler mgeisler added the bug Something isn't working label Oct 2, 2023
@HidenoriKobayashi
Copy link
Collaborator Author

Hi @mgeisler,

Re: removing the tag, I'll create a PR sometime this week, hopefully.

Re: confusion of mdbook, I'll open an issue as suggested. I personally would not consider this specific case as bug if it does not intend to handle any HTML tags. However I'll still open an issue, since there might be a potential bug that could affect a supported case.

Thanks for the suggestions!

@mgeisler
Copy link
Collaborator

mgeisler commented Oct 3, 2023

I personally would not consider this specific case as bug if it does not intend to handle any HTML tags. However I'll still open an issue, since there might be a potential bug that could affect a supported case.

I think we should handle this case in mdbook-i18n-helpers.

qwandor pushed a commit that referenced this issue Oct 6, 2023
The html tag seems to confuse the mdbook-i18n-helpers and make the
translation work hard (#1284).

This simply replaces them with a set of parenthesis.
@HidenoriKobayashi
Copy link
Collaborator Author

I'm closing this issue,because

  • the issue in the title should have been resolved by the PR
  • the potential issue in the i18n-helpers has another issue in its own project

@mgeisler mgeisler linked a pull request Oct 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants