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

en-GB Locale. Closes #1305 #1307

Closed
wants to merge 1 commit into from
Closed

Conversation

14sprouj
Copy link

@14sprouj 14sprouj commented Sep 1, 2023

14sprouj Medium 14sprouj /master → Lissy93/dashy Commits: 1 | Files Changed: 1 | Additions: 446 Label Unchecked Tasks Powered by Pull Request Badge

Thank you for contributing to Dashy! So that your PR can be handled effectively, please populate the following fields (delete sections that are not applicable)

Category:

Feature

Overview

Added en-GB locale

Issue Number (if applicable) #1305

New Vars (if applicable)

If you've added any new build scripts, environmental variables, config file options, dependency or devDependency, please outline here

Screenshot (if applicable)

If you've introduced any significant UI changes, please include a screenshot

Code Quality Checklist (Please complete)

  • All changes are backwards compatible
  • All lint checks and tests are passing
  • There are no (new) build warnings or errors
  • (If a new config option is added) Attribute is outlined in the schema and documented
  • (If a new dependency is added) Package is essential, and has been checked out for security or performance
  • Bumps version, if new feature added

@14sprouj 14sprouj requested a review from Lissy93 as a code owner September 1, 2023 19:47
@netlify
Copy link

netlify bot commented Sep 1, 2023

Deploy Preview for dashy-dev ready!

Name Link
🔨 Latest commit 6911d7b
🔍 Latest deploy log https://app.netlify.com/sites/dashy-dev/deploys/64f23fe86adf8300077657cb
😎 Deploy Preview https://deploy-preview-1307--dashy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@viezly
Copy link

viezly bot commented Sep 1, 2023

Changes preview:

Legend:

👀 Review pull request on Viezly

Copy link
Owner

@Lissy93 Lissy93 left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @14sprouj :)

There's just one small thing left to do, which is importing your new locale into /src/utils/languages.js - here's a guide on how to do this.

Something like this:

import enGB from '@/assets/locales/en-GB.json';
....
{ // English, the OG edition
    name: 'British English',
    code: 'en-GB',
    locale: enGB,
    flag: '🇬🇧',
},

Copy link
Owner

@Lissy93 Lissy93 left a comment

Choose a reason for hiding this comment

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

Hiya @14sprouj

I can't make this change on your branch from my end, as I don't think you ticked the Allow Maintainer Edits option in your PR. But before this can be merged, you just need to add the following into /src/utils/languages.js

import enGB from '@/assets/locales/en-GB.json';

and

  { // British English
    name: 'British English',
    code: 'en-GB',
    locale: enGB,
    flag: '🏴󠁧󠁢󠁥󠁮󠁧󠁿',
  },

There's a guide on how to do this here, but let me know if you still need any help

Copy link
Owner

@Lissy93 Lissy93 left a comment

Choose a reason for hiding this comment

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

Where there's no change between the value in the default locale (en / American English), we don't need to include anything, as it'll just be inherited.
And it's actually best to just leave out these duplicate values, so that if anything needs updating it won't need to be modified in two places.

So this file can actually just look something like this:

{
  "theme-maker": {
    "reset-toast": "Custom Colours for {theme} Removed"
  },
  "widgets": {
    "gluetun-status": {
      "organization": "Organisation"
    },
    "nextcloud": {
      "memory-utilisation": "memory utilisation"
    }
  }
}

@Lissy93
Copy link
Owner

Lissy93 commented Oct 27, 2023

Hi @14sprouj - I'm going to close this for now, as not heard back. But let me know below if you want to come back to it, and I'll re-open.

@Lissy93 Lissy93 closed this Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants