Code blocks in translation file are lost

We noticed one issue in the generated file by Crowdin.

In the source file (English), we have the below code blocks:

The part is not touched in the translation and kept as it is. But in the translated markdown file, the code blocks are missing somehow, and only markups are left.

<WidgetEditor id='1' height="120px">


      <div class="container border border-info pt-3 min-vw-100 text-center">
        <Markdown text={placement} />
      </div>
    

</WidgetEditor>

We think this is a Crowdin bug, and want to know whether there’s one way to workaround this issue.

Reference

Hello @robertyan

Hmm, interesting case. What’s your project export option? Please try switching to a default (those that are not skipping any string or file), build the project, and download the translation once more.

If this wouldn’t help, I’m sure our development team will be able to assist, but I need both source and received translation files for the test.

thanks Dima,

I’m using the default export settings and never changed that. I think we need your developers to help take a look.

The document is live here: Markdown Viewer | NEAR Documentation

If you switch to Korean, you’ll find the code in the editor is broken: 마크다운 뷰어 | NEAR Documentation

Hi @robertyan!

Thanks for the details, we will check this furthermore and once we have any news, we will let you know.

1 Like

Great, thanks for the files!

So, just for confirmation, having “export only approved translation” turned off doesn’t change anything? By default only “save context information” is turned on, can you kindly do a test with “export only approved translation” unchecked?

1 Like

Yeah. I have tried disabling “export only approved translation”, but it doesn’t work.

The exported file is the same.

<WidgetEditor id='1' height="120px">


      <div class="container border border-info pt-3 min-vw-100 text-center">
        <Markdown text={placement} />
      </div>
    

</WidgetEditor>

Thanks for your test, much appreciated! I’ll do few tests from my side as well.

Hello @robertyan

We have a global MD improvement on the roadmap, and it should fix this behavior, but unfortunately, I can’t say for sure when it will be released. Best and worst estimation times are very different.

As for now, would it be possible for you to upload this file in MDX format? Can be done with CLI or API, with a file type specified as MDX.

Thanks @Dima ,

But I don’t quite understand what’s the difference from what I have uploaded above.

You can find all the source code of the docs (in MDX already I think), and the other dependent files in this repo: https://github.com/near/docs/blob/master/docs/bos/components/markdown.md All the markdown and components are open source.

@robertyan I know, but there’s a chance that specifying the file type as MDX would do magic for our system parser. If it would not, then the only thing that remains is to wait for the MD improvement we’re going to release.

I see. Any examples about how to do this with Crowdin CLI?

@robertyan Here is an article where everything is described, and you are welcome to find it attached below:

@Dima @Tania thanks. I have tried with this configuration, but it seems the output markdown has no change. The problem is still there.

  {
    source: '/docs/bos/components/markdown.md',
    translation: '/website/i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/bos/components/%original_file_name%',
    type: 'mdx',
  }

Hi @robertyan ! The .md improvement (that is currently in the process) will fix this, but some time is needed here for the team

Thank you all for addressing this issue, I know these things can be hard to estimate but do you have any estimation on when these new features may be available?

Hi!
At the moment we can’t tell you the exact day when it will be done as developers are quite busy these days, but we’ll keep you posted when we have any news

1 Like