Skip to content

frontend: localize hardcoded "Lines" and "All" strings in LogsButton#6129

Open
Adii-45 wants to merge 1 commit into
kubernetes-sigs:mainfrom
Adii-45:fix-logsbutton-i18n
Open

frontend: localize hardcoded "Lines" and "All" strings in LogsButton#6129
Adii-45 wants to merge 1 commit into
kubernetes-sigs:mainfrom
Adii-45:fix-logsbutton-i18n

Conversation

@Adii-45

@Adii-45 Adii-45 commented Jun 21, 2026

Copy link
Copy Markdown

Summary

Localizes two hardcoded English strings ("Lines" and "All") in the LogsButton
lines-count dropdown that were missed when other LogsButton strings were localized.

Related Issue

Fixes #6128

Changes

  • Replaced hardcoded Lines label with the existing translation key.
  • Replaced hardcoded All menu item with the existing translation key.
  • Reused existing translation entries; no new translation keys were added.

Testing

  • npm run frontend:lint:fix
  • npm run frontend:lint
  • npm run frontend:tsc
  • Relevant component tests pass

Notes for the Reviewer

Both translation keys ("All" and "Lines") already exist infrontend/src/i18n/locales/en/translation.json (lines 405 and 665 respectively) so no translation file changes are required. The "All" key is already used by this same component for the Severity dropdown's renderValue.

@kubernetes-prow

Copy link
Copy Markdown

Welcome @Adii-45!

It looks like this is your first PR to kubernetes-sigs/headlamp 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/headlamp has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@kubernetes-prow kubernetes-prow Bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 21, 2026
@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Adii-45
Once this PR has been reviewed and has the lgtm label, please assign yolossn for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot requested review from ashu8912 and kahirokunn June 21, 2026 13:28
@Adii-45

Adii-45 commented Jun 21, 2026

Copy link
Copy Markdown
Author

Hi @illume,

This is my first contribution to Headlamp. The change is intentionally small and scoped to issue #6128, reusing the existing i18n keys already present in the project!

I'd appreciate any feedback or suggestions for improvement. Looking forward to contributing more to Headlamp..!

Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves frontend internationalization coverage in the LogsButton UI by replacing two remaining hardcoded English strings in the “lines count” dropdown with existing i18n translation keys.

Changes:

  • Localized the “Lines” InputLabel in the logs line-count selector.
  • Localized the “All” menu option in the same selector using an existing translation key.

Comment on lines +532 to 533
<InputLabel>{t('translation|Lines')}</InputLabel>
<Select value={lines} onChange={handleLinesChange}>

@skoeva skoeva left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could you rebase this against main?

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

frontend: Localize hardcoded "Lines" and "All" strings in LogsButton

3 participants