tolgee / tolgee-platform

Developer & translator friendly web-based localization platform
https://tolgee.io
Other
1.96k stars 202 forks source link

Visual editor & All format support #1547

Closed Martin005 closed 8 months ago

Martin005 commented 1 year ago

Visual editor

The current editor helps you with ICU syntax but doesn't help you with placeholders or HTML tags. For many, this is not an issue but it's problematic for example in the Arabic language, where it's hard to mix HTML and Arabic characters.

By visual editor, we mean a nice environment, where tags and parameter placeholders are represented visually, so translators don't have to worry about them. The plurals are also visually represented, so users can edit them without understanding the message formatting language.

Formats support

Tolgee currently works fine with ICU message format and you can import data in .po format. However, there are many more formats we want to support. We would like to create a universal solution for format support, so we will be able to support any format in the future.

Checklist

Required

Plural support

Tolgee will store plurals in ICU message format. When importing from other formats, the string will be converted to ICU plurals. The inner of each plural form will be escaped, so it doesn't get interpreted and doesn't break ICU formatter. For such strings special plural editor with input for each form will be displayed. Nested or multiple plurals per key won't be supported for other than ICU strings. For ICU strings, single input with raw ICU string will be displayed.

Universal ICU Placeholders

Tolgee will be able to convert specific parameters to it's native Universal ICU Placeholders. The syntax

{param_name, [param_type], [param_style]}

Supported conversions:

{param_name}

{param_name, number}

{param_name, number, scientific}

{param_name, number, 0.precision zeros}

Disabled Universal ICU Placeholders

To make Tolgee more convenient for users who work with native formats like .po or .strings, which use the c-like placeholders like %s, there will be option to disable Universal ICU placeholders.

When ICU Universal Placeholders is disabled, the escaping will happen only for ICU format plural forms, otherwise, strings won't be escaped.

Placeholder conversion on export

Placeholder conversion on export

Apple format specifics

Apple format does support different plural forms then ICU Message Format, while they declare, they follow Unicode standard. Since Tolgee will support only the ICU forms, the unsupported form from apple files will be discarded.

Import JSON and yaml

Before finalization checklist

Docs

chogarcia commented 1 year ago

any update on this? looks like https://github.com/tolgee/tolgee-js/issues/3077 is almost there

JanCizmar commented 1 year ago

any update on this? looks like https://github.com/tolgee/tolgee-js/issues/3077 is almost there

The issue you're mentioning is not related to this. That issue mentions the ability to render Markdown on frontend. (Which we probably won't do now, since we don't want to over-engineer the package)

chogarcia commented 1 year ago

thanks for replying, what about having markdown in visual editor? any ETA on that?

JanCizmar commented 1 year ago

thanks for replying, what about having markdown in visual editor? any ETA on that?

End of September I hope : https://github.com/orgs/tolgee/projects/2?pane=issue&itemId=20285299

CoenQian commented 11 months ago

any update on this? Q4 is almost over.

JanCizmar commented 9 months ago

Hello @CoenQian, @chogarcia !

Sorry we're a bit delayed. But we have a deadline on February 16th. Please let me know if you're looking for a specific format, we will be supper happy for projects who would test our solution with different formats. :)

JanCizmar commented 9 months ago

Hello everyone! Unfortunately, we have to extend the deadline for this task by two weeks. We've encountered several issues due to the task's complexity and want to ensure a high-quality result. Also because future modifications could lead to breaking changes in the API and the behaviour of the import and export.

The new deadline is 1st March. We apologize for any inconvenience.

chogarcia commented 8 months ago

wow thats awesome, looking forward to it!

what we are looking for is a text editor we can format (as markdown ideally) so we can parse it on the frontend to display long texts with paragraphs, bold, italic, titles, etc. Atm creating one key for each paragraph is been a nightmare to the point where we were considering other options and move away from tolgee.

JanCizmar commented 8 months ago

Update: Due to delays with last implementation details and writing documentation, we need to postpone the release day to 5th March.

JanCizmar commented 8 months ago

Hey! We've released the major Visual Editor & Formats support on Tuesday 🎉.

There are still some subtasks, we didn't finish in time, so I am converting it to separate issues.

To make this super user convenient, we also need to enhance the CLI, which will also unlock simpler integration with Github and Gitlab.