Skip to content

Fix i18n string misplacement in decidim-initiatives#12874

Merged
andreslucena merged 2 commits intodevelopfrom
fix/i18n-strings-placements
May 30, 2024
Merged

Fix i18n string misplacement in decidim-initiatives#12874
andreslucena merged 2 commits intodevelopfrom
fix/i18n-strings-placements

Conversation

@microstudi
Copy link
Copy Markdown
Contributor

@microstudi microstudi commented May 22, 2024

🎩 What? Why?

If you don't enable initiatives, which is very common on Decidim for organizations, you will notice that the top menu for components in the admin shows the raw i18n key "decidim.admin.actions.manage".
This is because this key is defined in the en.yml file on initiatives. It should be in the admin module.

This should backported as it's there from long time ago.

📌 Related Issues

Link your PR to an issue

  • Related to #?
  • Fixes #?

Testing

Just' don't install initiatives, run decidim, try to administrate a component.
In production mode you will see a raw i18n key. In development it just breaks the application which makes development very uncomfortable.

📷 Screenshots

Please add screenshots of the changes you are proposing
Description

♥️ Thank you!

@request-info
Copy link
Copy Markdown

request-info bot commented May 22, 2024

It seems like you did not give us much information about what you are trying to do here. We would appreciate it if you could provide us with more info about this issue/PR!

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: ['type: feature', 'type: change', 'type: fix', 'type: removal', 'target: developer-experience', 'type: internal']

@microstudi microstudi added the type: fix PRs that implement a fix for a bug label May 22, 2024
github-actions[bot]
github-actions bot previously approved these changes May 22, 2024
@alecslupu alecslupu self-assigned this May 26, 2024
Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

Great finding! I found another one related to this one, when going to a Components' manage page in the admin (as Proposals) without decidim-initiatives.

Can you add it please?

diff --git a/decidim-admin/config/locales/en.yml b/decidim-admin/config/locales/en.yml
index ecb057ac4c..09175b5b03 100644
--- a/decidim-admin/config/locales/en.yml
+++ b/decidim-admin/config/locales/en.yml
@@ -571,6 +571,7 @@ en:
         appearance: Appearance
         area_types: Area types
         areas: Areas
+        components: Components
         configuration: Configuration
         content: Reported content
         external_domain_allowlist: Allowed external domains
diff --git a/decidim-initiatives/config/locales/en.yml b/decidim-initiatives/config/locales/en.yml
index 83e556be63..e66e373e03 100644
--- a/decidim-initiatives/config/locales/en.yml
+++ b/decidim-initiatives/config/locales/en.yml
@@ -106,7 +106,6 @@ en:
       menu:
         attachments: Attachments
         committee_members: Committee members
-        components: Components
         information: Information
         initiative_type_scopes: Initiative type scopes
         initiatives: Initiatives

@andreslucena andreslucena changed the title Fix i18n string misplacement Fix i18n string misplacement in decidim-initiatives May 29, 2024
@microstudi
Copy link
Copy Markdown
Contributor Author

Great finding! I found another one related to this one, when going to a Components' manage page in the admin (as Proposals) without decidim-initiatives.

Can you add it please?

diff --git a/decidim-admin/config/locales/en.yml b/decidim-admin/config/locales/en.yml
index ecb057ac4c..09175b5b03 100644
--- a/decidim-admin/config/locales/en.yml
+++ b/decidim-admin/config/locales/en.yml
@@ -571,6 +571,7 @@ en:
         appearance: Appearance
         area_types: Area types
         areas: Areas
+        components: Components
         configuration: Configuration
         content: Reported content
         external_domain_allowlist: Allowed external domains
diff --git a/decidim-initiatives/config/locales/en.yml b/decidim-initiatives/config/locales/en.yml
index 83e556be63..e66e373e03 100644
--- a/decidim-initiatives/config/locales/en.yml
+++ b/decidim-initiatives/config/locales/en.yml
@@ -106,7 +106,6 @@ en:
       menu:
         attachments: Attachments
         committee_members: Committee members
-        components: Components
         information: Information
         initiative_type_scopes: Initiative type scopes
         initiatives: Initiatives

nice! applied!

@andreslucena andreslucena merged commit 8bfd130 into develop May 30, 2024
@andreslucena andreslucena deleted the fix/i18n-strings-placements branch May 30, 2024 08:02
@andreslucena andreslucena added the no-backport Pull Requests that should not be backported label Jun 10, 2024
@andreslucena
Copy link
Copy Markdown
Member

Adding the no-backport label as this was already backported to v0.28 and I can't find these strings in the v0.27 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: admin module: initiatives no-backport Pull Requests that should not be backported type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants