Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

Ensure "---" tags are in English #9

Closed
pcolladosoto opened this issue Jul 31, 2020 · 9 comments
Closed

Ensure "---" tags are in English #9

pcolladosoto opened this issue Jul 31, 2020 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@pcolladosoto
Copy link
Collaborator

pcolladosoto commented Jul 31, 2020

Description

We need to ensure tags in between "---" are in English.

Applicable to

  • All .md files.

Acceptance criteria

  • Ensure that tags --- x --- and --- /x --- are left intact in the translated .md files. Specifically the following problems and their combinations should be detected and corrected:
    • Missing single dash: -- x --.
    • Translated tag text: --- y ---. Where y is the translated version of x in the target language.
    • Missing spaces: ---x---.

Open questions

  • Can we assume that --- x --- and --- /x --- tags are located in dedicated paragraphs?

Ideas

  • Prevent translators from changing the translation for these entries.
  • Revert changes in these entries.
    • This requires access to the original (English) version of the file.
    • Assumes these tags are always on a separate line.
    • Will automatically fix problems like 3 dashes having been replaced with 2 dashes.

Issues

@pcolladosoto
Copy link
Collaborator Author

As in issue #7, maybe having the original english files as an additional input, would help with these corrections as well (especially the “translated tag text” one).

Original author: Manos Zeakis (@ezeakis)

@wheleph wheleph self-assigned this Nov 15, 2020
@wheleph
Copy link
Owner

wheleph commented Nov 15, 2020

@majamanojlovic in order to implement this feature properly I need to know additional details about how Crowdin interprets .md files.

My assumption (please correct me if I'm wrong):

How do you make strings hidden?
Screenshot 2020-11-15 at 17 38 36

Do you have any idea why Crowdin puts \--- instead of --- and also merges these tags into a single line \--- hints \--- \--- hint \---. Example: https://raw.githubusercontent.com/raspberrypilearning/boat-race/l10n_master/uk-UA/step_3.md

@majamanojlovic
Copy link
Collaborator

majamanojlovic commented Nov 25, 2020

@wheleph sorry for not replying sooner!

  1. I am honestly quite confused about this one. I could have sworn each sentence, or a line in some cases, is treated as a separate string but looking at the text of Stickers in Crowdin, it seems like entire paragraphs are actually strings. For example, this whole paragraph is treated as one string, even though it consists of two sentences:

par2

But then here we again have two sentences in the same paragraph, but each is treated as a separate string:

par1

Or am I missing something?

  1. We hide the strings manually in project's settings in Crowdin.

  2. I'm afraid I don't know why Crowdin adds \ to tags. As for merging into a single line - I think it's because there is no space between the tags (hint in this case) in the English version.

English:
eng

vs Ukrainian:
ukr

@wheleph
Copy link
Owner

wheleph commented Jan 23, 2021

Original code of NTTT contains some replacements for that weird Crowdin output. For instance it replaces \--- with ---.

But the code also contains replacement ## --- -> ---. @majamanojlovic do you have any idea why we have that kind of replacement? What do we try to fix with it?

@wheleph
Copy link
Owner

wheleph commented Jan 23, 2021

@majamanojlovic never mind. It has something to do with fixing of title tags (https://raw.githubusercontent.com/raspberrypilearning/stickers/l10n_master/uk-UA/step_1.md):

## \--- collapse \---

## title: Нотатки керівника клубу

@wheleph
Copy link
Owner

wheleph commented Feb 1, 2021

@majamanojlovic can you tell me how translations end up in l10n_master? Is there a background process that continuously pulls data from Crowdin and puts it into the branch or do you pull this data from Crowdin explicitly before publishing?

@majamanojlovic
Copy link
Collaborator

@wheleph Crowdin and l10n_master are connected via integrations, which are quite unreliable. In theory, the integrations are supposed to continuously pull data from Crowdin and add it to the branch, but they are often disconnecting. Whenever we go publish a project, we check the integration, and if it's broken (which often is the case) we need to re-connect it with the repo in GitHub again.

@wheleph
Copy link
Owner

wheleph commented Oct 17, 2021

@majamanojlovic is it safe to assume that formatting tags like "--- x ---" should be on separate lines in md files?
So if we see a line like --- x --- --- y ---, we transform it to:

--- xxx ---
--- yyy ---

As well as --- xxx --- some text here:

--- xxx ---
some text here

@majamanojlovic
Copy link
Collaborator

majamanojlovic commented Oct 18, 2021

@wheleph

--- xxx --- some text here should be (if possible):

--- xxx ---

some text here

We want the text separated from the tag because we hide the tags in Crowdin. If there's no space between the two, they appear as the same string in Crowdin and we can't hide the tag.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants