Commit Graph

52 Commits

Author SHA1 Message Date
Oren Cohen
1be84ad3cd
🌐 Added Hebrew translations (#17056)
no ref

Added most no-brainer Hebrew translations but left the more complicated ones to people better equipped to translate them. Better something than nothing at all.

Also, Hebrew is an RTL language, so exclamation points and dots at the end of a sentence should appear at the leftmost part, but the translation files are LTR, as all JSON files are. Just putting it out there. This should be considered when using an RTL language translation.

---------

Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-11-15 18:24:51 +00:00
Sparsh
dba01d1e1a
🌐 Added Nepali locale for Ghost (#21552)
no ref

- [x] Created a new folder `ne` based on locale code for Nepali locale
inside `ghost/i18n/locales/`
- [x] Cloned 6 new JSON files pertaining to `en` folder from English
locale.
- [x] Added all field translations from English to Nepali for
`ghost.json` file.
- [x] Added all field translations from English to Nepali for
`search.json` file.
- [x] Added all field translations from English to Nepali for
`signup-form.json` file.
- [ ] TODO: Remaining 3 other files viz. `comments`, `newsletter`, and
`portal`.


"Thank you for creating Ghost and making it open source.": "Ghost
सिर्जना गरेर यसलाई ओपन सोर्स बनाउनु भएकोमा धन्यवाद।"
2024-11-15 17:01:49 +00:00
Cathy Sarisky
1d429b8b09
🌐Added i18n for newsletter strings (#21433)
no issue

This PR adds the ability to translate the strings that appear in the
newsletter as boilerplate text, using i18next.

Variables are in single mustaches ( `{date}` ) in the translation
strings (rather than `{{date}}`), because these strings occur both the
email template.hbs and also .js files. That necessitated a separate
namespace.

This PR also includes changes to the newsletter button ("more like
this", "less like this", "comment") that were previously delivered on
desktop as images that included the text. @sanne-san provided a rework
that removed text-as-image from the desktop buttons, and allows more
shared code between the two layouts, along with making the buttons
translatable.

Example usage - handlebars
```
<h3 class="latest-posts-header">{{t 'Keep reading'}}</h3>

{{{t 'By {authors}' authors=post.authors }}} 
```
(NOTE: triple { required because of possible & )

Example usage - javascript
```
                getValue: (member) => {
                    if (member.status === 'comped') {
                        return t('complimentary');
                    }
                    if (this.isMemberTrialing(member)) {
                        return t('trialing');
                    }
                    // other possible statuses: t('free'), t('paid') //
                    return t(member.status);
                }
```

---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-10-31 08:41:39 -05:00
sateshcharan
638e7d8d1a
Added Indian-Tamil translations (#21239)
no issue

--
Co-authored-by: Cathy Sarisky <42299862+cathysarisky@users.noreply.github.com>
2024-10-08 14:39:32 +00:00
Shah Newaj
44eeed2472
🌐 Added locale for Bengali Language (bn) (#20432)
no ref
- Only modified signup form for now
- Soon the other files will be translated

Added Bengali (bn) Locale.
2024-10-04 17:30:04 +00:00
Peter Jidamva
531793535d
🌐 Added Swahili language translations (#20485)
no ref

Added Locale for Swahili Language🎊!

This pull request adds support for the Swahili language locale to our
project. As a fluent Swahili speaker (Swahili is my native language) and
i am from Tanzania, I have ensured that all translations are accurate
and culturally appropriate.

Changes
-Added sw locale files for Swahili
-Included translations for all the json files for comments.json ,
ghost.json , portal.json ,signup-form.json

Why
Swahili is a widely spoken language in East Africa, with over 80 million
native speakers and an estimated 200 million speakers in total. Adding
Swahili support will make our project more accessible to this large and
growing user base

---------

Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-10-04 16:21:22 +00:00
Cathy Sarisky
cf63094e13
🌐 Updated Hindi translations (#21208)
no ref

Hindi translations - original PR from meSingh, thank you! #20631
2024-10-03 21:01:39 +00:00
Cathy Sarisky
69a283b229
🌐 Added Urdu translations (#21209)
no issue

A re-submission of @siddiqss 's work on translating Urdu.  
#18508

---------

Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-10-03 20:43:32 +00:00
Cathy Sarisky
6501f1d41b
🌐 Added Kazakh locale and translations (#21174)
no ref

This is a merge & tidy up of [[ayangizzat](https://github.com/ayangizzat)] 's original (https://github.com/TryGhost/Ghost/pull/20698), which was missing the changes to locale, causing folders & files not to generate correctly. All credit goes to @ayangizzat , and thank you for your work!

Kazakh-speaking help still needed for search.json, which is untranslated, and the addition of a few other new strings, and refinements anywhere needed. Please add comments if not yet merged, or open a new PR if already merged.

---------

Co-authored-by: ayangizzt
2024-10-01 21:45:03 +00:00
Cathy Sarisky
43b57aa53c
🐛🌐 Added missing locales to i18n.js (#21144)
- Apparently several PRs for new languages were merged without the
corresponding additions to i18n.js, which has caused new strings not to
be generated for those languages, and missing translations in the
frontend, even though we had them in the .json file.

- I've added language codes for all languages that had at least some
strings translated in i18n/locales, and have run yarn translate to
create missing strings and files for these languages.

New language codes for:
* Arabic
* Swiss German
* Greek
* Estonian
* Macedonian
* Serbian (Cyrillic)
* Thai
2024-09-27 14:07:51 +01:00
Cathy Sarisky
2a2d7bb9ad
Added i18n support to search - ready for translator work! (#21055)
ref https://github.com/TryGhost/Ghost/issues/16628

This adds translation support to search, which should be the last missing piece of i18n support for Ghost's frontend  🎉
- Translation (t) helper added to sodo-search.
- Ghost head tweaked to include data-locale.
- All (I hope) strings in sodo-search wrapped in the t helper.
- Possibly poor-quality French translation strings added.

---------

Co-authored-by: Vikas Potluri <vikaspotluri123.github@gmail.com>
2024-09-24 12:39:32 +01:00
Michael Barrett
4a59e30050
Published new versions of apps to support BS locale (#20629)
refs
[ONC-150](https://linear.app/tryghost/issue/ONC-150/support-escalation-re-trouble-with-new-languages)

Published new versions of apps to support BS locale
- comments-ui@0.17.3
- signup-form@0.1.5
- portal@2.37.10
2024-07-19 09:26:59 +01:00
Amir
7a045ded00
Adding Persian/Farsi to supported languages (#20219)
Fixes #20214
2024-05-23 09:54:28 -04:00
Ryan Feigenbaum
1c017f1b7b
Add Lithuanian language support (#19621)
Add Lithuanian language (lt) support
2024-01-30 14:37:03 -05:00
Chris Mitchell
07e5e2c272
Added Scottish Gaelic translations (#19001)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-11-20 15:56:51 +00:00
Peter Gonda
a2eb8e960a
Added Slovak translations (#18401) 2023-10-31 14:23:18 +01:00
Daniel Lockyer
c3b2fd0551 Reformatted supported languages list
refs https://github.com/TryGhost/Product/issues/2795

- fixes some bad ordering
2023-08-29 08:59:11 +01:00
Daniel Lockyer
03a9a1d7e1 Added Icelandic as supported language
refs https://github.com/TryGhost/Product/issues/2795

- the translations have existed for a while but they were never in the
  list of supported locales
- this adds the language to that list
2023-08-29 08:59:11 +01:00
Simon Backx
4f604af744 🐛 Fixed translations with spaces missing in signup-form
refs https://ghost.slack.com/archives/C02G9E68C/p1692784819620269
refs https://github.com/TryGhost/Product/issues/3504

- Somehow, when using i18n in TypeScript, the require will put some of the keys into 'default' and not into the root. Mainly all keys that have a space in them. Couldn't find any documentation about this
- The solution is to also add 'default' to the keys that are being used in the code

This change also fixes the translate script (wasn't updated for updated paths), includes the missing translations, and already adds comments to lookup translation strings
2023-08-23 15:11:41 +02:00
Shaun Roselt
3e683c2f06
Added Japanese to list of supported languages (#17724)
fixes https://github.com/TryGhost/Ghost/issues/17715

- `ja` was missing from the list of supported locales
- also fixes some small typos discovered now the language is supported

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-08-16 09:44:01 +00:00
jrefsnes
c2e082090b
Added Norwegian Nynorsk as supported language (#17423)
refs https://github.com/TryGhost/Team/issues/2795
2023-07-20 06:47:27 +00:00
Daniel Lockyer
974ce0b25b
Updated i18n support locales
refs https://github.com/TryGhost/Team/issues/2795

- added Croatian and Malay, and added the changes they've had since
  merging
2023-06-14 12:29:01 +02:00
Ronald Langeveld
c53bd499c7
Added typescript declerations to i18n (#16894)
refs https://github.com/TryGhost/Team/issues/3307

Added TypeScript support and a new namespace for the `i18n` module. This
enables type checking and localisation for the new signup form component and future typescript projects that may need to add i18n support.
2023-05-31 10:37:21 +02:00
Gary Lai
ae7311e74f
Added Traditional Chinese translations (#16786)
refs https://github.com/TryGhost/Team/issues/2795
2023-05-31 09:52:42 +02:00
Daniel Lockyer
7d4a09a6bb
Added language names to list of supported locales
refs https://github.com/TryGhost/Team/issues/2795

- this helps to understand what languages are already supported,
  especially when the locale code isn't obvious
2023-05-30 15:32:52 +02:00
Daniel Lockyer
c604255ace
Updated list of supported locales
refs https://github.com/TryGhost/Team/issues/2795

- adds in Finnish and Albanian locales as they were added via merged PR earlier
2023-05-30 12:07:01 +02:00
Daniel Lockyer
1811f96472
Updated list of locales
refs https://github.com/TryGhost/Team/issues/2795

- adds Korean, which I just merged
2023-05-25 10:00:27 +02:00
Daniel Lockyer
09e11c6a29
Updated list of locales
refs https://github.com/TryGhost/Team/issues/2795

- adds Romanian and Serbian, which I merged earlier today
2023-05-24 16:13:14 +02:00
Daniel Lockyer
bed7479cc2 Fixed loading pt-br translations
fixes https://github.com/TryGhost/Ghost/issues/16805

* turns out i18next requires the country portal of the locale to be
  capitalized [1]
* this resolves that and moves the files to the correct casing

[1]: https://github.com/i18next/i18next/issues/1467#issuecomment-646305827
2023-05-24 10:27:49 +02:00
Daniel Lockyer
3ae29567d4
Added missing locales
- forgot to do this after merging the PRs
2023-05-12 15:39:28 +02:00
Daniel Lockyer
b0483d1ef3
Updated supported locales 2023-05-05 13:24:41 +02:00
Naz
d2f4c097a0 Added Ukrainian locale for Portal
refs https://github.com/TryGhost/Team/issues/2795

- Ukrainian translation - used informal form
2023-04-21 17:26:51 +02:00
Daniel Lockyer
cebad9ae0c
Added support for new locales
- Danish and Chinese as per recent pull requests
2023-04-14 08:14:10 +01:00
Kasun Chanuka Fernando
427337633b
Added Sinhalese locale (#16595)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-14 07:47:10 +01:00
Daniel Lockyer
7435b18c85
Added support for new locales
refs https://github.com/TryGhost/Team/issues/2795

- PRs for these locales were merged this morning so we need this to
  enable the languages
2023-04-10 14:05:33 +02:00
Daniel Lockyer
a9ad931c9f
Updated list of supported locales
refs https://github.com/TryGhost/Team/issues/2795

- stemming from recent PR merges
2023-04-06 19:43:10 +02:00
John O'Nolan
5b1bf3ae0d
Added support for Polish and Spanish translations 2023-04-02 10:47:40 -04:00
John O'Nolan
1ce416ad00
Added support for Czech translations 2023-04-02 10:42:22 -04:00
Ronald Langeveld
cbe97ad792
Added Afrikaans locale to Portal (#16464)
refs https://github.com/TryGhost/Team/issues/2795

WIP - getting some additional eyes on it 👨🏼‍🏫.

---------

Co-authored-by: John O'Nolan <john@ghost.org>
2023-03-30 10:01:29 -04:00
Sodbileg Gansukh
83795edcad
Added Mongolian locale to Portal (#16465)
no issues

Co-authored-by: John O'Nolan <john@ghost.org>
2023-03-30 09:59:18 -04:00
Aileen Booker
3f23fefaf5
Added German locale for Portal (#16469)
refs https://github.com/TryGhost/Team/issues/2795

- Used informal form ('du')

Happy for feedback!!!
2023-03-30 09:58:01 -04:00
Peter Zimon
79bb55a737
Added Hungarian locale for Portal (#16488)
Hungarian translation for email contents and Portal.
2023-03-30 09:57:09 -04:00
Sagar Gupta
7f92014c58 Added French (fr) translations
refs https://github.com/TryGhost/Team/issues/2795
- Used informal form ("tu")
2023-03-22 09:24:03 +01:00
Daniel Lockyer
eb5ed7dda8
Reformatted SUPPORTED_LOCALES array to new lines
refs https://github.com/TryGhost/Team/issues/2795

- this helps reduce conflicts when multiple PRs are coming in to add new
  languages
- I'd also like to enforce alphabetically sorted keys but I can't figure
  out the magic eslint incantation yet
2023-03-22 08:50:29 +01:00
Daniel Lockyer
21ea426794 Added i18n service to Ghost core
refs https://github.com/TryGhost/Ghost/issues/15502

- this adds the scaffolding for enabling i18n translations within Ghost
  core
- also adds `yarn translate:ghost` as an option to the `i18n` package
- the locale is currently hardcoded to `en` so we don't utilize the
  translations until we're ready
2023-03-16 14:50:50 +01:00
Daniel Lockyer
0273ba2066
Disabled i18next debug mode in development
- I didn't realise how annoying this would be so this commit disables it
2023-03-16 14:06:38 +01:00
Daniel Lockyer
f717c093e7
Fixed linting 2023-03-01 10:30:18 +01:00
Daniel Lockyer
6d8ca23625
Added support for namespaces to i18n package
refs https://github.com/TryGhost/Ghost/issues/15502

- this adds support for namespaces to the i18n package so we can
  separate translations for different packages
2023-03-01 10:24:08 +01:00
Daniel Lockyer
2804445d41
Fixed returning key when value is empty string
refs https://github.com/TryGhost/Ghost/issues/15502

- in the event the value is an empty string, we want to return the key
- this config option enables that
2023-02-27 13:18:55 +01:00
Daniel Lockyer
2cf161168b
Added yarn translate:portal command
refs https://github.com/TryGhost/Ghost/issues/15502

- the amazing `i18next-parser` dependency will extract our translated
  strings from Portal and dump them into locale files, so we never have
  to add them manually
2023-01-18 18:23:53 +01:00