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

I18n: Translate phrases for new Browse Dashboards #70654

Merged

Conversation

Bohdanator
Copy link
Contributor

@Bohdanator Bohdanator commented Jun 24, 2023

What is this feature?

This PR marks strings in the new folder management UI for translation.

Which issue(s) does this PR fix?:

Fixes #70085

Special notes for your reviewer:

I am completely new to this project :). I was able to set up Grafana locally, but I wasn't able to toggle nestedFolders feature. After putting it in custom.ini config file nothing happened (also after restart). What else is required?

I would also like feedback on the translation IDs. This is my first time working with i18n or Crowdin, so I'm not sure what else is required for these translation IDs to be added. (Also if the ID structure makes sense.)

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@Bohdanator Bohdanator requested a review from a team as a code owner June 24, 2023 14:49
@Bohdanator Bohdanator requested review from joshhunt and JoaoSilvaGrafana and removed request for a team June 24, 2023 14:49
@CLAassistant
Copy link

CLAassistant commented Jun 24, 2023

CLA assistant check
All committers have signed the CLA.

@Bohdanator Bohdanator changed the title 70085 i18n for managing dashboards i18n for managing dashboards Jun 24, 2023
@grafanabot grafanabot added area/frontend pr/external This PR is from external contributor labels Jun 24, 2023
@joshhunt
Copy link
Contributor

We'll check this more in the week, but to enable a feature flag your grafana server config (custom.ini) should look like this

[feature_toggles]
nestedFolders=true

Also be sure to run yarn i18n:extract after marking up any new phrases.

@Bohdanator Bohdanator force-pushed the 70085-i18n-for-managing-dashboards branch from 17af39e to 68cd489 Compare June 25, 2023 19:59
@tskarhed tskarhed added this to the 10.1.x milestone Jun 26, 2023
@tskarhed tskarhed added add to changelog no-backport Skip backport of PR labels Jun 26, 2023
@joshhunt joshhunt changed the title i18n for managing dashboards I18n: Translate phrases for new Browse Dashboards Jun 26, 2023
Copy link
Contributor

@RoxanaAnamariaTurc RoxanaAnamariaTurc left a comment

Choose a reason for hiding this comment

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

@Bohdanator thank you for your contribution, please check the comments I left for you.

? t('browse-dashboards.action.deleting', 'Deleting...')
: t('browse-dashboards.action.delete-button', 'Delete'),
[isDeleting]
);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the useMemo hook is necessary in this case, you can just use the t() function inside the ternary directly

() =>
isMoving ? t('browse-dashboards.action.moving', 'Moving...') : t('browse-dashboards.action.move-button', 'Move'),
[isMoving]
);
Copy link
Contributor

Choose a reason for hiding this comment

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

See above comment about useMemo hook.

Copy link
Contributor

@RoxanaAnamariaTurc RoxanaAnamariaTurc left a comment

Choose a reason for hiding this comment

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

Hi, we merged main and resolved some merge conflicts , we had some phrases that were already translated and we went with what was already in main. Thank you for contributing.

@RoxanaAnamariaTurc RoxanaAnamariaTurc merged commit d36b70d into grafana:main Jul 4, 2023
11 checks passed
polibb pushed a commit that referenced this pull request Jul 14, 2023
* Mark strings in folder manager nav for translation

* Mark strings in folder actions for translation

* Mark strings in new folder modal for translation

* Mark strings in delete modal for translation

* Mark strings in move modal for translation

* Fix interpunction in translations

* Run i18n:extract

* Fix Manage Permissions drawer test

* Redundnt useMemo

* Updated extracted translations after resolving conflicts

---------

Co-authored-by: Roxana Turc <anamaria-roxana.turc@grafana.com>
@ricky-undeadcoders ricky-undeadcoders removed this from the 10.1.x milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend no-backport Skip backport of PR pr/external This PR is from external contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

i18n for managing dashboards
7 participants