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

Add translation key for time ago and related strings #4400

Closed
wants to merge 22 commits into from

Conversation

cyril59310
Copy link
Contributor

⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma

Tick the checkbox if you understand [x]:

  • I have read and understand the pull request rules.

Description

Add translation keys

Fixes #(issue)

Type of change

Please delete any options that are not relevant.

  • Other

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas (including JSDoc for methods)
  • My changes generates no new warnings
  • My code needed automated testing. I have added them (this is optional task)

Screenshots (if any)

Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.

@cyril59310 cyril59310 changed the title Add translation keyx Add translation keys Jan 20, 2024
src/components/HeartbeatBar.vue Outdated Show resolved Hide resolved
Comment on lines +189 to +191
return (seconds / 60).toFixed(0) + "m";
} else {
return (seconds / 60 / 60).toFixed(0) + "h ago";
return (seconds / 60 / 60).toFixed(0) + "h";
Copy link
Collaborator

@CommanderStorm CommanderStorm Jan 21, 2024

Choose a reason for hiding this comment

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

Please add a translation instead of just removing it, or am I missing something? ^^

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because I wanted to do it like the beginning of the bar and add the key "ago." However, I realized that by doing this, both the "now" key was also displayed

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I deleted it to leave only the 'now' or '1m' at the end without displaying the 'ago'

image

src/mixins/socket.js Outdated Show resolved Hide resolved
src/lang/en.json Outdated Show resolved Hide resolved
@CommanderStorm CommanderStorm added this to the 1.23.12 milestone Jan 21, 2024
cyril59310 and others added 3 commits January 21, 2024 17:36
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
@chakflying
Copy link
Collaborator

  • FYI you can rebase the branch on master to remove the unrelated commits.
  • The main reason the heartbeat time indication was not translated, is because "the minimum width of heartbeats where the time indication should be displayed" is a fixed value. If the text can be translated, this width becomes variable. I don't see an easy way of handling this.

@louislam louislam added the question Further information is requested label Jan 21, 2024
@chakflying
Copy link
Collaborator

Although I suppose we could just increase the value to be much larger than necessary to be safe.

@CommanderStorm CommanderStorm marked this pull request as draft January 23, 2024 12:25
@louislam louislam modified the milestones: 1.23.12, 2.0.0 Jan 25, 2024
@github-actions github-actions bot added pr:please resolve merge conflict A merge-conflict needs to be addressed before reviewing makes sense again and removed pr:please resolve merge conflict A merge-conflict needs to be addressed before reviewing makes sense again labels May 19, 2024
@github-actions github-actions bot removed the pr:please resolve merge conflict A merge-conflict needs to be addressed before reviewing makes sense again label Jun 3, 2024
@CommanderStorm
Copy link
Collaborator

Rebased this PR in #4813 to remove the uninteded changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
house keeping pr:please address review comments this PR needs a bit more work to be mergable question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants