snoozz-tab-snoozing icon indicating copy to clipboard operation
snoozz-tab-snoozing copied to clipboard

[FEATURE] Open to translations?

Open walrus543 opened this issue 3 years ago • 4 comments

Hello, I really appreciate your extension and your work. I'd like to help this project by translating the UI to French. Would you be willing to manage your project with new languages?

Thank you anyway.

walrus543 avatar Nov 15 '21 13:11 walrus543

hey @Primokorn . I am open to adding different languages to Snoozz. Currently the extension is not friendly at all to any form of translation so I will need to figure out the best course of action before proceeding. I will definitely reach out to you soon when any progress towards this is made

rohanb10 avatar Nov 16 '21 14:11 rohanb10

About being translation-friendly, a simple way would be:

  • Having a translations folder (lang, translations, locales etc.), with something like plain .json files (bwinton/SnoozeTabs had a simple locales folder with a .properties file)
  • Having a new "translation-loader" file, with some kind of parsing function, or Map / Object
  • Replacing each final text / string (final, for the final user) with a call to the translation

Here, I analyzed some files, and found the lines where there's "final text".

Analyzed files

Model

  • [ ] folder
    • [ ] filename @ lines
      • line: content
      • line?: (maybe) possible reason
      • line

Analyzed files

  • [ ] html/
    • [ ] nap-room.html
    • [ ] popup.html
    • [ ] rise-and-shine.html
    • [ ] settings.html
  • [ ] scripts/
    • [ ] background.js
    • [ ] common.js
    • [ ] nap_room.js
    • [x] popup.js @ lines
      • 74: duplicate or edit
      • 94 & 96 & 98?: (maybe) direct use of label as final text
      • 98?: (maybe) format with dayjs¹
      • 103: choose custom time / interval
      • 135 & 170: can't snooze this tab
      • 184 & 185 & 186: morning / evening / current time
      • 209?: (maybe) format with dayjs¹
      • 257: days of week
      • 276: select days / dates
      • 277?: (maybe) format with dayjs¹
      • 283: days every week
      • 288: days every month
      • 395 & 396?: (maybe) format with dayjs¹
      • 411: choose your own time
      • 477: clone zone
      • 509: duplicating
      • 525?: (maybe) snoozing {id}
    • [x] rise.js @ lines
      • 30?: (maybe) format with dayjs¹
      • 32
      • 33
    • [x] settings.js @ lines
      • 101: confirm remove from Snoozz history
      • 114 & 115: confirm update
      • 179?: (maybe) direct use of label as final text
      • 180: open sleeping tabs
      • 181: open popup
      • 189: confirm reset settings
      • 254: importation success

¹ About multi-language formating with dayjs: I know nothing about it yet.

guiga-zalu avatar Dec 20 '21 20:12 guiga-zalu

@guiga-zalu thank you so much! this is extremely useful.

Will start working on this next year and allow user submissions for different languages. I'm sure theres a way to work with different languages in dayjs. If not, I'll just make sure the strings are configured in my extension and the use of dayjs is minimal

rohanb10 avatar Dec 22 '21 05:12 rohanb10

Hi, just discovered your add-on and installed it in Firefox. I like the interface design and settings! If you are ready for / interested in Dutch translations, give me a sign.

rubcap avatar Mar 15 '22 21:03 rubcap