Translation Preview fails for TOML files due to "Invalid regular expression: /*.toml/: Nothing to repeat"

If you preview the source file of a toml, no issue occurs.
But if you preview the translation file of a toml, you get the following error on the page:

An unexpected error occurred during the file preview. Would you mind trying again later?

And the following error from the API:

The file parameters.toml cannot be processed by the Regex Content Processor app. Crowdin App Response Error: Crowdin app returned error message "Invalid regular expression: /*.toml/: Nothing to repeat".

This occurs regardless of how translated the file is, how many approvals there are, etc. It occurs in all languages, for all files.

If this regex is from something we input, the only place it could possibly be from would be our crowdin.yml:

project_id_env: CROWDIN_PROJECT_ID
base_path: .
preserve_hierarchy: true

  - source: /words/source/*.toml
    translation: /words/translations/%two_letters_code%/%original_file_name%
  - source: /sandbox/source/*.toml
    translation: /sandbox/translations/%two_letters_code%/%original_file_name%
  - source: /luka_pona/fingerspelling/source/*.toml
    translation: /luka_pona/fingerspelling/translations/%two_letters_code%/%original_file_name%
  - source: /luka_pona/signs/source/*.toml
    translation: /luka_pona/signs/translations/%two_letters_code%/%original_file_name%

Hi @gregdan3 , the Regex app should be installed in the account by the project owner, it’s not in the yml file. As we can see, there are no projects under the gregdan3 account, could you please kindly tell us the project name where you run API? As well, do you run the Download File Preview API call?

Apologies: We are not directly using the API; I worded that poorly. I was checking the error that came back in the developer tools network tab, where the request to made by pressing Ctrl+P or clicking the translation preview button fails. I errantly called this “the API” but it is not the public API, just the backend. We are seeing this error in the translator view.

This is for the project “nimi Linku” in the enterprise instance “kulupu Linku” or just

Installing the regex app in our instance. did not change the outcome.

Dear @gregdan3 , thank you for the clarification, now understand your actions done. The thing is that toml format doesn’t support WYSIWYG Preview in the editor, you may check this in the documentation:

As well, I thought that Regex app was installed in your project and it interferes the result of the API request, there is no need to install it, so you’re welcome to delete it

1 Like

Understood, thanks! I didn’t realize the WYSIWYG editor is the preview, and was especially thrown when the preview worked for source files but not translation files. My bad, and thank you for the quick help!

Dear @gregdan3 , you’re always welcome :slightly_smiling_face: