puter icon indicating copy to clipboard operation
puter copied to clipboard

Replace human-readable text with i18n keys

Open jelveh opened this issue 1 year ago • 10 comments

For translation purposes, we need to replace all human-readable text in the UI components with i18n(key) calls. This will allow for easier localization in the future.

Tasks

  • [ ] Identify all human-readable text in files located under ./src/gui/src/UI
  • [ ] Replace each instance of human-readable text with i18n(key)
  • [ ] Add corresponding translations for each key in ./src/gui/src/i18n/translations/en.js

Implementation Details

  1. Go through each file in ./src/gui/src/UI
  2. For each human-readable string found:
    • Create a unique, descriptive key for the string
    • Replace the string with i18n(key)
    • Add the key-value pair to ./src/gui/src/i18n/translations/en.js

Example

Before:

<button>Submit</button>

After:

<button>{i18n('submit')}</button>

In ./src/gui/src/i18n/translations/en.js:

const en = {
    name: "English",
    english_name: "English",
    code: "en",
    dictionary: {
        // ... existing translations
        'submit_button_text': 'Submit',
        // ... existing translations
    }
}

Additional Notes

  • Ensure keys are descriptive and follow a consistent naming convention
  • Be cautious with dynamic text or text that includes variables
  • Consider context when creating keys to avoid potential conflicts

Definition of Done

  • All human-readable text in files under ./src/gui/src/UI is replaced with i18n(key) calls.
  • All new keys are added to ./src/gui/src/i18n/translations/en.js with correct English translations.
  • The application builds without errors and all UI elements display correctly.

jelveh avatar Aug 13 '24 20:08 jelveh

hey can I work on this?

ADTmux avatar Aug 14 '24 07:08 ADTmux

Of course! Assigned ✌️

Let me know if you need help.

jelveh avatar Aug 14 '24 07:08 jelveh

Hi! If you need help translating new keys into Russian, call me.

NFFY88 avatar Aug 15 '24 07:08 NFFY88

Hey, mind if I give a go?

Schlipe avatar Aug 16 '24 00:08 Schlipe

Hey, mind if I give a go?

This issue is already assigned. Let me double-check quickly to see if they're working on it.

Hey @ADTmux, are you still working on this issue?

jelveh avatar Aug 16 '24 00:08 jelveh

@ADTmux just a quick follow-up, are you still working on this? I think @Schlipe is interested if you don't have time to finish it.

jelveh avatar Aug 18 '24 01:08 jelveh

@Schlipe are you still interested in picking this up? I can assign it to you.

jelveh avatar Aug 18 '24 17:08 jelveh

@Schlipe are you still interested in picking this up? I can assign it to you.

Yes, u may assign I'll try my best

Schlipe avatar Aug 18 '24 18:08 Schlipe

Thank you @Schlipe. Assigned. Let me know if you need any help :)

jelveh avatar Aug 18 '24 18:08 jelveh

Hey. LMK if any help needed. I can contribute.

nbgslv avatar Apr 12 '25 10:04 nbgslv

Hi. Is this issue still open ? I would love to work on this.

Anant1107 avatar Jul 01 '25 09:07 Anant1107

Yes, it's still open! Assigned :) Let me know if you need help.

jelveh avatar Jul 01 '25 15:07 jelveh

Can I give it a try? @jelveh

meher745 avatar Jul 03 '25 05:07 meher745

Hi @meher745, thanks for your interest in contributing to Puter. This issue is already assigned to @Anant1107. I'd be happy to assign another issue to you if you're interested.

jelveh avatar Jul 03 '25 06:07 jelveh

HI @jelveh , I would love to work on another issue. Pease assign it to me.

meher745 avatar Jul 04 '25 02:07 meher745

Hi @jelveh Is this issue still open? Can I take it?

karan1205 avatar Jul 29 '25 17:07 karan1205