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

fix: Translate form and workflow builder #25482

Merged
merged 44 commits into from Mar 18, 2024

Conversation

szufisher
Copy link
Contributor

@szufisher szufisher commented Mar 15, 2024

Please provide enough information so that others can review your pull request:

Explain the details for making this change. What existing problem does the pull request solve?

Screenshots/GIFs
fix #25382

after approval, please backport to version 15.

@szufisher szufisher requested a review from a team as a code owner March 15, 2024 15:02
@szufisher szufisher requested review from ankush and removed request for a team March 15, 2024 15:02
@ankush
Copy link
Member

ankush commented Mar 15, 2024

Something feels off. We shouldn't be translating labels here right? These are source strings being edited by developers.

Your opinion? @barredterra

@barredterra
Copy link
Collaborator

barredterra commented Mar 15, 2024

I agree. All the string literals (__('Search fieldtypes...'), etc.) are fine. But I wouldn't translate the labels/descriptions being defined by the user via the builder – that's probably more confusing than useful.

@szufisher
Copy link
Contributor Author

final result is like below now.

image

@szufisher
Copy link
Contributor Author

@ankush any further changes needed to get it approved?

Copy link
Collaborator

@barredterra barredterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ankush ankush enabled auto-merge March 18, 2024 13:11
@ankush ankush disabled auto-merge March 18, 2024 13:11
@ankush ankush merged commit 41a7b42 into frappe:develop Mar 18, 2024
18 of 22 checks passed
@ankush ankush changed the title [fix] Translate form and workflow builder fix: Translate form and workflow builder Mar 18, 2024
Copy link
Contributor

@cogk cogk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<EditableInput> value is translated when typing, which kinda breaks Form Builder's UX when using non-English but latin language (e.g. French).

Sorry if I'm late to the party, rest of the PR is nice, thank you!

@ankush ankush added the backport version-15-hotfix Backport the PR to v15 label Mar 19, 2024
mergify bot pushed a commit that referenced this pull request Mar 19, 2024
* Update AttachControl.vue

* Update ButtonControl.vue

* Update CheckControl.vue

* Update CodeControl.vue

* Update DataControl.vue

* Update ImageControl.vue

* Update LinkControl.vue

* Update RatingControl.vue

* Update SelectControl.vue

* Update SignatureControl.vue

* Update TableControl.vue

* Update TextControl.vue

* Update TextEditorControl.vue

* Update Section.vue

* Update Column.vue

* Update Tabs.vue

* Update Field.vue

* Update Sidebar.vue

* Update AddFieldButton.vue

* Update AddFieldButton.vue

* Update Section.vue

* Update WorkflowBuilder.vue

* Update Autocomplete.vue

* Update EditableInput.vue

* Update AttachControl.vue

* Update ButtonControl.vue

* Update CheckControl.vue

* Update CodeControl.vue

* Update DataControl.vue

* Update ImageControl.vue

* Update LinkControl.vue

* Update RatingControl.vue

* Update SelectControl.vue

* Update SignatureControl.vue

* Update TextControl.vue

* Update TextEditorControl.vue

* Update Field.vue

* Update EditableInput.vue

* Update TableControl.vue

* Update Column.vue

* fix: variable in translatable string

* fix: add context for row number label

* fix: translate labels in workflow builder

* style: formatting

---------

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 41a7b42)

# Conflicts:
#	frappe/public/js/form_builder/components/Field.vue
ankush added a commit to ankush/frappe that referenced this pull request Mar 19, 2024
ankush added a commit that referenced this pull request Mar 19, 2024
ankush added a commit that referenced this pull request Mar 19, 2024
ankush added a commit that referenced this pull request Mar 19, 2024
* fix: Translate form and workflow builder (#25482)

* Update AttachControl.vue

* Update ButtonControl.vue

* Update CheckControl.vue

* Update CodeControl.vue

* Update DataControl.vue

* Update ImageControl.vue

* Update LinkControl.vue

* Update RatingControl.vue

* Update SelectControl.vue

* Update SignatureControl.vue

* Update TableControl.vue

* Update TextControl.vue

* Update TextEditorControl.vue

* Update Section.vue

* Update Column.vue

* Update Tabs.vue

* Update Field.vue

* Update Sidebar.vue

* Update AddFieldButton.vue

* Update AddFieldButton.vue

* Update Section.vue

* Update WorkflowBuilder.vue

* Update Autocomplete.vue

* Update EditableInput.vue

* Update AttachControl.vue

* Update ButtonControl.vue

* Update CheckControl.vue

* Update CodeControl.vue

* Update DataControl.vue

* Update ImageControl.vue

* Update LinkControl.vue

* Update RatingControl.vue

* Update SelectControl.vue

* Update SignatureControl.vue

* Update TextControl.vue

* Update TextEditorControl.vue

* Update Field.vue

* Update EditableInput.vue

* Update TableControl.vue

* Update Column.vue

* fix: variable in translatable string

* fix: add context for row number label

* fix: translate labels in workflow builder

* style: formatting

---------

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 41a7b42)

# Conflicts:
#	frappe/public/js/form_builder/components/Field.vue

* chore: conflicts

* fix: avoid translating layout field labels

- section
- tabs

Resolves #25482 (comment)

---------

Co-authored-by: Fisher Yu <12823863+szufisher@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot pushed a commit that referenced this pull request Mar 27, 2024
# [15.19.0](v15.18.2...v15.19.0) (2024-03-27)

### Bug Fixes

* add missing arg while invoking _download_multi_pdf ([f82ed9f](f82ed9f))
* allow page length 2500 ([#25062](#25062)) ([75b1f6c](75b1f6c))
* **Contact form:** make email translatable ([800cfee](800cfee))
* **Contact form:** make title and options translatable ([b1dbd79](b1dbd79))
* **Contact form:** translate internal notification to system language ([f67e5f1](f67e5f1))
* DB Query distinct handling with full table name ([#25594](#25594)) ([4fe0498](4fe0498))
* diff after converting to html to text ([#25582](#25582)) ([#25584](#25584)) ([bd7372d](bd7372d))
* Mark totals row correctly for print ([#25629](#25629)) ([#25631](#25631)) ([725018f](725018f))
* only add title field in search if it exists ([#25634](#25634)) ([#25636](#25636)) ([b2260c1](b2260c1))
* redirect after login, todo filters (backport [#25521](#25521)) ([#25561](#25561)) ([d9f9aa4](d9f9aa4)), closes [#25455](#25455) [#25455](#25455)
* respect `null` as number value ([#25639](#25639)) ([5b64ac9](5b64ac9))
* set list row height to 40px ([#25619](#25619)) ([#25625](#25625)) ([af406f9](af406f9))
* **test:** update RQ serialization test ([c764282](c764282))
* Translate form and workflow builder (backport [#25482](#25482)) ([#25547](#25547)) ([01f469f](01f469f))
* **webhook:** `r` is referenced here before its initialized ([a60bb4e](a60bb4e)), closes [#21064](#21064)
* **workspace:** Don't allow Welcome as default workspace ([819a24c](819a24c))

### Features

* allow setting a custom rate limit for `login via email link` feature ([c7af627](c7af627))
* connect to redis sentinel for redis queue ([#25557](#25557)) ([82a33c3](82a33c3))
* drop sentry's RQ integration ([1eab176](1eab176))
* **workspace:** Allow user to choose a default workspace ([bfa1a83](bfa1a83))

### Performance Improvements

* Faster "show title in link field" on list view ([#25597](#25597)) ([#25622](#25622)) ([f62a30c](f62a30c))
* remove useless sorting on docstatus ([#25571](#25571)) ([#25591](#25591)) ([5e5853e](5e5853e))

### Reverts

* Revert "fix: escape text types before setting disp area (#25520) (#25523)" (#25603) ([bbf55df](bbf55df)), closes [#25520](#25520) [#25523](#25523) [#25603](#25603)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-15-hotfix Backport the PR to v15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] form builder and workflow builder user interface not translated
4 participants