core icon indicating copy to clipboard operation
core copied to clipboard

Add / Edit new Language

Open hmoreras opened this issue 1 year ago • 7 comments

Parent Issue

#28474

User Story

As a user, I need the ability to add new Locale for eventual listing. This will provide me with a comprehensive view of the available languages within the system and empower me to contribute new languages as needed.

Acceptance Criteria

  • [ ] Users should be able to add new locales via a user-friendly interface integrated into the listing table.
  • [ ] Follow Designs.

Proposed Objective

User Experience

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://www.figma.com/file/tTWRVYunjnzTAWaj8Ctvra/Locales-%2F-Languages?node-id=472-21986&mode=dev

DEMO: https://www.figma.com/proto/tTWRVYunjnzTAWaj8Ctvra/Locales-%2F-Languages?page-id=0%3A1&type=design&node-id=356-41347&viewport=-1747%2C-4187%2C0.26&t=fx8jP5j5bAGXSHbC-1&scaling=scale-down&starting-point-node-id=356%3A41347&show-proto-sidebar=1

Reference: https://github.com/dotCMS/core/issues/25605

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

hmoreras avatar May 08 '24 02:05 hmoreras

I found a couple of points to fix/discuss doing internal QA.

  1. I created a Custom locale with uu-dd as the Locale ID, the problem I see is we are not parsing correctly the language code, and it is just present under the Language column and not broken down as Language code: uu and Country code: dd, that could also be be reflected in the DB where the value uu-dd is stored in the language code column. image

  2. When attempt to change the default language we got a modal with a message saying:

    Setting this language as the default will alter the language of all site content and communications.

    Be mindful of any unintended consequences.

    image

    Not sure if changing the default language changes the "communications", we are not changing the Admin language to affect that.

  3. When trying to delete a language with related content, the system fails saying you cannot delete a language with related content, that's perfect, the issue is, that for some reason, after that process, the portlet is in a weird state where subsequent delete operations just won't work. 2024-06-07_12-25-57 (1)

jgambarios avatar Jun 07 '24 18:06 jgambarios

@jgambarios Humberto and I reviewed your feedback for #1 and #2.

For #1, any locale which uses a known language and country should use the Standard Locale. And for Custom Locale, we need to treat the whole string as a block (rather than splitting it into language and country) because we need to be able to support some legacy locales that may be up to 5 characters without a dash in them.

For #2, I sent him some new text for the modal that I think is clearer.

john-thomas-dotcms avatar Jun 24 '24 15:06 john-thomas-dotcms

QA Note:

  1. Go to Settings - Roles & Tools, System and add the Locales Toot in the menu.
  2. Go to http://localhost:8080/dotAdmin/#/locales

hmoreras avatar Jun 25 '24 20:06 hmoreras

Adding Standard Locale

image image

Editing recently added Locale

image image

Setting as default recently edited Locale

image

Text is what was provided after @jgambarios pointed out

image

Adding Custom Locale

image image

Deleting a Locale

Deleting default Locale (option not provided en context menu)

image

Deleting a non-default Locale

image image image

Deleting a Locale with related content

image

Then deleting a Locale without related content

image image

Push-Publish

image image

victoralfaro-dotcms avatar Jun 25 '24 22:06 victoralfaro-dotcms

Failed: Tested on trunk_ebf61ad, Docker, macOS 14.5, FF v126.0.1

We should defined a by default sorting as the same as other protlets within the app

Screenshot 2024-06-26 at 12 22 32 PM

After selecting a sorting for the elements and going to another portlet and back, the previously selected sorting gets lost

https://github.com/dotCMS/core/assets/129882031/734b8242-3c79-417e-b7f5-c768fea68477

Scrolling is not working when sufficient elements are added to the feature. Should we have pagination?

Screenshot 2024-06-26 at 12 58 43 PM

Please use the message after coping to the clipboard is done

Screenshot 2024-06-26 at 10 11 12 AM

josemejias11 avatar Jun 26 '24 19:06 josemejias11

regarding Jose feedback, the first point "We should defined a by default sorting as the same as other protlets within the app" will be worked under https://github.com/dotCMS/core/issues/29040

hmoreras avatar Jun 28 '24 13:06 hmoreras

Failed: Tested on trunk_8d0420b, Docker, macOS 14.5, FF v126.0.1

I'm not seeing the changes implemented yet on the latest trunk/master

josemejias11 avatar Jun 28 '24 22:06 josemejias11

@josemejias11 just checked and changes are there. reach me if is not the case.

hmoreras avatar Jul 02 '24 14:07 hmoreras

Failed: Tested on trunk_8c2a1e5, Docker, macOS 14.5, FF v126.0.1

Please use the message after coping to the clipboard is done 343300755-01e08bb4-c550-4455-8605-30d6f8004f86

Please use the below image as reference Screenshot 2024-07-02 at 11 14 17 AM

josemejias11 avatar Jul 02 '24 17:07 josemejias11

Approved: Tested on trunk_eeca0f8, Docker, macOS 14.5, FF v126.0.1

josemejias11 avatar Jul 04 '24 21:07 josemejias11