Merge pull request #246 from glitch-soc/theme-intl8n

Internationalization for flavours and skins
master
beatrix 7 years ago committed by GitHub
commit 26c9b9fa27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/controllers/application_controller.rb
  2. 7
      app/javascript/flavours/glitch/locales/ar.js
  3. 7
      app/javascript/flavours/glitch/locales/bg.js
  4. 7
      app/javascript/flavours/glitch/locales/ca.js
  5. 7
      app/javascript/flavours/glitch/locales/de.js
  6. 50
      app/javascript/flavours/glitch/locales/en.js
  7. 7
      app/javascript/flavours/glitch/locales/eo.js
  8. 7
      app/javascript/flavours/glitch/locales/es.js
  9. 7
      app/javascript/flavours/glitch/locales/fa.js
  10. 7
      app/javascript/flavours/glitch/locales/fi.js
  11. 7
      app/javascript/flavours/glitch/locales/fr.js
  12. 7
      app/javascript/flavours/glitch/locales/he.js
  13. 7
      app/javascript/flavours/glitch/locales/hr.js
  14. 7
      app/javascript/flavours/glitch/locales/hu.js
  15. 7
      app/javascript/flavours/glitch/locales/id.js
  16. 7
      app/javascript/flavours/glitch/locales/io.js
  17. 7
      app/javascript/flavours/glitch/locales/it.js
  18. 48
      app/javascript/flavours/glitch/locales/ja.js
  19. 7
      app/javascript/flavours/glitch/locales/ko.js
  20. 7
      app/javascript/flavours/glitch/locales/nl.js
  21. 7
      app/javascript/flavours/glitch/locales/no.js
  22. 7
      app/javascript/flavours/glitch/locales/oc.js
  23. 48
      app/javascript/flavours/glitch/locales/pl.js
  24. 7
      app/javascript/flavours/glitch/locales/pt-BR.js
  25. 7
      app/javascript/flavours/glitch/locales/pt.js
  26. 7
      app/javascript/flavours/glitch/locales/ru.js
  27. 7
      app/javascript/flavours/glitch/locales/sv.js
  28. 7
      app/javascript/flavours/glitch/locales/th.js
  29. 7
      app/javascript/flavours/glitch/locales/tr.js
  30. 7
      app/javascript/flavours/glitch/locales/uk.js
  31. 7
      app/javascript/flavours/glitch/locales/zh-CN.js
  32. 7
      app/javascript/flavours/glitch/locales/zh-HK.js
  33. 7
      app/javascript/flavours/glitch/locales/zh-TW.js
  34. 6
      app/javascript/flavours/glitch/names.yml
  35. 6
      app/javascript/flavours/glitch/theme.yml
  36. 6
      app/javascript/flavours/vanilla/names.yml
  37. 10
      app/javascript/flavours/vanilla/theme.yml
  38. 46
      app/javascript/glitch/locales/en.json
  39. 44
      app/javascript/glitch/locales/ja.json
  40. 44
      app/javascript/glitch/locales/pl.json
  41. 0
      app/javascript/locales/locale-data/README.md
  42. 0
      app/javascript/locales/locale-data/oc.js
  43. 0
      app/javascript/skins/vanilla/win95/common.scss
  44. 4
      app/javascript/skins/vanilla/win95/names.yml
  45. 8
      app/lib/themes.rb
  46. 6
      app/views/layouts/application.html.haml
  47. 4
      app/views/settings/preferences/show.html.haml
  48. 6
      config/initializers/locale.rb
  49. 2
      config/locales/ca.yml
  50. 2
      config/locales/en.yml
  51. 2
      config/locales/es.yml
  52. 2
      config/locales/fr.yml
  53. 2
      config/locales/pl.yml
  54. 5
      config/webpack/configuration.js
  55. 108
      config/webpack/generateLocalePacks.js
  56. 11
      config/webpack/shared.js

@ -62,6 +62,7 @@ class ApplicationController < ActionController::Base
pack: pack_name,
preload: nil,
skin: nil,
supported_locales: data['locales'],
}
if data['pack'][pack_name].is_a?(Hash)
pack_data[:common] = nil if data['pack'][pack_name]['use_common'] == false
@ -93,6 +94,7 @@ class ApplicationController < ActionController::Base
pack: nil,
preload: nil,
skin: nil,
supported_locales: data['locales'],
}
end

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/ar.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/bg.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/ca.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/de.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,50 @@
import inherited from 'mastodon/locales/en.json';
const messages = {
'getting_started.open_source_notice': 'Glitchsoc is free open source software forked from {Mastodon}. You can contribute or report issues on GitHub at {github}.',
'layout.auto': 'Auto',
'layout.current_is': 'Your current layout is:',
'layout.desktop': 'Desktop',
'layout.mobile': 'Mobile',
'navigation_bar.app_settings': 'App settings',
'getting_started.onboarding': 'Show me around',
'onboarding.page_one.federation': '{domain} is an \'instance\' of Mastodon. Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.',
'onboarding.page_one.welcome': 'Welcome to {domain}!',
'onboarding.page_six.github': '{domain} runs on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}, and is compatible with any Mastodon instance or app. Glitchsoc is entirely free and open-source. You can report bugs, request features, or contribute to the code on {github}.',
'settings.auto_collapse': 'Automatic collapsing',
'settings.auto_collapse_all': 'Everything',
'settings.auto_collapse_lengthy': 'Lengthy toots',
'settings.auto_collapse_media': 'Toots with media',
'settings.auto_collapse_notifications': 'Notifications',
'settings.auto_collapse_reblogs': 'Boosts',
'settings.auto_collapse_replies': 'Replies',
'settings.close': 'Close',
'settings.collapsed_statuses': 'Collapsed toots',
'settings.enable_collapsed': 'Enable collapsed toots',
'settings.general': 'General',
'settings.image_backgrounds': 'Image backgrounds',
'settings.image_backgrounds_media': 'Preview collapsed toot media',
'settings.image_backgrounds_users': 'Give collapsed toots an image background',
'settings.media': 'Media',
'settings.media_letterbox': 'Letterbox media',
'settings.media_fullwidth': 'Full-width media previews',
'settings.preferences': 'User preferences',
'settings.wide_view': 'Wide view (Desktop mode only)',
'settings.navbar_under': 'Navbar at the bottom (Mobile only)',
'status.collapse': 'Collapse',
'status.uncollapse': 'Uncollapse',
'home.column_settings.show_direct': 'Show DMs',
'notification.markForDeletion': 'Mark for deletion',
'notifications.clear': 'Clear all my notifications',
'notifications.marked_clear_confirmation': 'Are you sure you want to permanently clear all selected notifications?',
'notifications.marked_clear': 'Clear selected notifications',
'notification_purge.btn_all': 'Select\nall',
'notification_purge.btn_none': 'Select\nnone',
'notification_purge.btn_invert': 'Invert\nselection',
'notification_purge.btn_apply': 'Clear\nselected',
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/eo.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/es.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/fa.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/fi.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/fr.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/he.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/hr.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/hu.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/id.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/io.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/it.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,48 @@
import inherited from 'mastodon/locales/ja.json';
const messages = {
'getting_started.open_source_notice': 'Glitchsocは{Mastodon}によるフリーなオープンソースソフトウェアです。誰でもGitHub({github})から開発に參加したり、問題を報告したりできます。',
'layout.auto': '自動',
'layout.current_is': 'あなたの現在のレイアウト:',
'layout.desktop': 'デスクトップ',
'layout.mobile': 'モバイル',
'navigation_bar.app_settings': 'アプリ設定',
'getting_started.onboarding': '解説',
'onboarding.page_one.federation': '{domain}はMastodonのインスタンスです。Mastodonとは、独立したサーバが連携して作るソーシャルネットワークです。これらのサーバーをインスタンスと呼びます。',
'onboarding.page_one.welcome': '{domain}へようこそ!',
'onboarding.page_six.github': '{domain}はGlitchsocを使用しています。Glitchsocは{Mastodon}のフレンドリーな{fork}で、どんなMastodonアプリやインスタンスとも互換性があります。Glitchsocは完全に無料で、オープンソースです。{github}でバグ報告や機能要望あるいは貢獻をすることが可能です。',
'settings.auto_collapse': '自動折りたたみ',
'settings.auto_collapse_all': 'すべて',
'settings.auto_collapse_lengthy': '長いトゥート',
'settings.auto_collapse_media': 'メディア付きトゥート',
'settings.auto_collapse_notifications': '通知',
'settings.auto_collapse_reblogs': 'ブースト',
'settings.auto_collapse_replies': '返信',
'settings.close': '閉じる',
'settings.collapsed_statuses': 'トゥート',
'settings.enable_collapsed': 'トゥート折りたたみを有効にする',
'settings.general': '一般',
'settings.image_backgrounds': '画像背景',
'settings.image_backgrounds_media': '折りたまれたメディア付きテゥートをプレビュー',
'settings.image_backgrounds_users': '折りたまれたトゥートの背景を変更する',
'settings.media': 'メディア',
'settings.media_letterbox': 'メディアをレターボックス式で表示',
'settings.media_fullwidth': '全幅メディアプリビュー',
'settings.preferences': 'ユーザー設定',
'settings.wide_view': 'ワイドビュー(デスクトップレイアウトのみ)',
'settings.navbar_under': 'ナビを画面下部に移動させる(モバイルレイアウトのみ)',
'status.collapse': '折りたたむ',
'status.uncollapse': '折りたたみを解除',
'notification.markForDeletion': '選択',
'notifications.clear': '通知を全てクリアする',
'notifications.marked_clear_confirmation': '削除した全ての通知を完全に削除してもよろしいですか?',
'notifications.marked_clear': '選択した通知を削除する',
'notification_purge.btn_all': 'すべて\n選択',
'notification_purge.btn_none': '選択\n解除',
'notification_purge.btn_invert': '選択を\n反転',
'notification_purge.btn_apply': '選択したものを\n削除',
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/ko.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/nl.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/no.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/oc.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,48 @@
import inherited from 'mastodon/locales/pl.json';
const messages = {
'getting_started.open_source_notice': 'Glitchsoc jest wolnym i otwartoźródłowym forkiem oprogramowania {Mastodon}. Możesz współtworzyć projekt lub zgłaszać błędy na GitHubie pod adresem {github}.',
'layout.auto': 'Automatyczny',
'layout.current_is': 'Twój obecny układ to:',
'layout.desktop': 'Desktopowy',
'layout.mobile': 'Mobilny',
'navigation_bar.app_settings': 'Ustawienia aplikacji',
'getting_started.onboarding': 'Rozejrzyj się',
'onboarding.page_one.federation': '{domain} jest \'instancją\' Mastodona. Mastodon to sieć działających niezależnie serwerów tworzących jedną sieć społecznościową. Te serwery nazywane są instancjami.',
'onboarding.page_one.welcome': 'Witamy na {domain}!',
'onboarding.page_six.github': '{domain} jest oparty na Glitchsoc. Glitchsoc jest {forkiem} {Mastodon}a kompatybilnym z każdym klientem i aplikacją Mastodona. Glitchsoc jest całkowicie wolnym i otwartoźródłowym oprogramowaniem. Możesz zgłaszać błędy i sugestie funkcji oraz współtworzyć projekt na {github}.',
'settings.auto_collapse': 'Automatyczne zwijanie',
'settings.auto_collapse_all': 'Wszystko',
'settings.auto_collapse_lengthy': 'Długie wpisy',
'settings.auto_collapse_media': 'Wpisy z zawartością multimedialną',
'settings.auto_collapse_notifications': 'Powiadomienia',
'settings.auto_collapse_reblogs': 'Podbicia',
'settings.auto_collapse_replies': 'Odpowiedzi',
'settings.close': 'Zamknij',
'settings.collapsed_statuses': 'Zwijanie wpisów',
'settings.enable_collapsed': 'Włącz zwijanie wpisów',
'settings.general': 'Ogólne',
'settings.image_backgrounds': 'Obrazy w tle',
'settings.image_backgrounds_media': 'Wyświetlaj zawartość multimedialną zwiniętych wpisów',
'settings.image_backgrounds_users': 'Nadaj tło zwiniętym wpisom',
'settings.media': 'Zawartość multimedialna',
'settings.media_letterbox': 'Letterbox media',
'settings.media_fullwidth': 'Podgląd zawartości multimedialnej o pełnej szerokości',
'settings.preferences': 'Preferencje użyytkownika',
'settings.wide_view': 'Szeroki widok (tylko w trybie desktopowym)',
'settings.navbar_under': 'Pasek nawigacji na dole (tylko w trybie mobilnym)',
'status.collapse': 'Zwiń',
'status.uncollapse': 'Rozwiń',
'notification.markForDeletion': 'Oznacz do usunięcia',
'notifications.clear': 'Wyczyść wszystkie powiadomienia',
'notifications.marked_clear_confirmation': 'Czy na pewno chcesz bezpowrtonie usunąć wszystkie powiadomienia?',
'notifications.marked_clear': 'Usuń zaznaczone powiadomienia',
'notification_purge.btn_all': 'Zaznacz\nwszystkie',
'notification_purge.btn_none': 'Odznacz\nwszystkie',
'notification_purge.btn_invert': 'Odwróć\nzaznaczenie',
'notification_purge.btn_apply': 'Usuń\nzaznaczone',
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/pt-BR.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/pt.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/ru.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/sv.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/th.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/tr.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/uk.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/zh-CN.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/zh-HK.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,7 @@
import inherited from 'mastodon/locales/zh-TW.json';
const messages = {
// No translations available.
};
export default Object.assign({}, inherited, messages);

@ -0,0 +1,6 @@
en:
flavours:
glitch: Glitch Edition
skins:
glitch:
default: Default

@ -20,6 +20,12 @@ pack:
settings:
share: packs/share.js
# (OPTIONAL) The directory which contains localization files for
# the flavour, relative to this directory. The contents of this
# directory must be `.js` or `.json` files whose names correspond to
# language tags and whose default exports are a messages object.
locales: locales
# (OPTIONAL) The directory which contains the pack files.
# Defaults to the theme directory (`app/javascript/themes/[theme]`),
# which should be sufficient for like 99% of use-cases lol.

@ -0,0 +1,6 @@
en:
flavours:
vanilla: Vanilla Mastodon
skins:
vanilla:
default: Default

@ -20,13 +20,17 @@ pack:
settings:
share: share.js
# (OPTIONAL) The directory which contains localization files for
# the flavour, relative to this directory.
locales: ../../mastodon/locales
# (OPTIONAL) The directory which contains the pack files.
# Defaults to the theme directory (`app/javascript/themes/[theme]`),
# but in the case of the vanilla Mastodon theme the pack files are
# Defaults to this directory (`app/javascript/flavour/[flavour]`),
# but in the case of the vanilla Mastodon flavour the pack files are
# somewhere else.
pack_directory: app/javascript/packs
# (OPTIONAL) By default the theme will fallback to the default theme
# (OPTIONAL) By default the theme will fallback to the default flavour
# if a particular pack is not provided. You can specify different
# fallbacks here, or disable fallback behaviours altogether by
# specifying a `null` value.

@ -1,46 +0,0 @@
{
"getting_started.open_source_notice": "Glitchsoc is free open source software forked from {Mastodon}. You can contribute or report issues on GitHub at {github}.",
"layout.auto": "Auto",
"layout.current_is": "Your current layout is:",
"layout.desktop": "Desktop",
"layout.mobile": "Mobile",
"navigation_bar.app_settings": "App settings",
"getting_started.onboarding": "Show me around",
"onboarding.page_one.federation": "{domain} is an 'instance' of Mastodon. Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.",
"onboarding.page_one.welcome": "Welcome to {domain}!",
"onboarding.page_six.github": "{domain} runs on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}, and is compatible with any Mastodon instance or app. Glitchsoc is entirely free and open-source. You can report bugs, request features, or contribute to the code on {github}.",
"settings.auto_collapse": "Automatic collapsing",
"settings.auto_collapse_all": "Everything",
"settings.auto_collapse_lengthy": "Lengthy toots",
"settings.auto_collapse_media": "Toots with media",
"settings.auto_collapse_notifications": "Notifications",
"settings.auto_collapse_reblogs": "Boosts",
"settings.auto_collapse_replies": "Replies",
"settings.close": "Close",
"settings.collapsed_statuses": "Collapsed toots",
"settings.enable_collapsed": "Enable collapsed toots",
"settings.general": "General",
"settings.image_backgrounds": "Image backgrounds",
"settings.image_backgrounds_media": "Preview collapsed toot media",
"settings.image_backgrounds_users": "Give collapsed toots an image background",
"settings.media": "Media",
"settings.media_letterbox": "Letterbox media",
"settings.media_fullwidth": "Full-width media previews",
"settings.preferences": "User preferences",
"settings.wide_view": "Wide view (Desktop mode only)",
"settings.navbar_under": "Navbar at the bottom (Mobile only)",
"status.collapse": "Collapse",
"status.uncollapse": "Uncollapse",
"home.column_settings.show_direct": "Show DMs",
"notification.markForDeletion": "Mark for deletion",
"notifications.clear": "Clear all my notifications",
"notifications.marked_clear_confirmation": "Are you sure you want to permanently clear all selected notifications?",
"notifications.marked_clear": "Clear selected notifications",
"notification_purge.btn_all": "Select\nall",
"notification_purge.btn_none": "Select\nnone",
"notification_purge.btn_invert": "Invert\nselection",
"notification_purge.btn_apply": "Clear\nselected"
}

@ -1,44 +0,0 @@
{
"getting_started.open_source_notice": "Glitchsocは{Mastodon}によるフリーなオープンソースソフトウェアです。誰でもGitHub({github})から開発に參加したり、問題を報告したりできます。",
"layout.auto": "自動",
"layout.current_is": "あなたの現在のレイアウト:",
"layout.desktop": "デスクトップ",
"layout.mobile": "モバイル",
"navigation_bar.app_settings": "アプリ設定",
"getting_started.onboarding": "解説",
"onboarding.page_one.federation": "{domain}はMastodonのインスタンスです。Mastodonとは、独立したサーバが連携して作るソーシャルネットワークです。これらのサーバーをインスタンスと呼びます。",
"onboarding.page_one.welcome": "{domain}へようこそ!",
"onboarding.page_six.github": "{domain}はGlitchsocを使用しています。Glitchsocは{Mastodon}のフレンドリーな{fork}で、どんなMastodonアプリやインスタンスとも互換性があります。Glitchsocは完全に無料で、オープンソースです。{github}でバグ報告や機能要望あるいは貢獻をすることが可能です。",
"settings.auto_collapse": "自動折りたたみ",
"settings.auto_collapse_all": "すべて",
"settings.auto_collapse_lengthy": "長いトゥート",
"settings.auto_collapse_media": "メディア付きトゥート",
"settings.auto_collapse_notifications": "通知",
"settings.auto_collapse_reblogs": "ブースト",
"settings.auto_collapse_replies": "返信",
"settings.close": "閉じる",
"settings.collapsed_statuses": "トゥート",
"settings.enable_collapsed": "トゥート折りたたみを有効にする",
"settings.general": "一般",
"settings.image_backgrounds": "画像背景",
"settings.image_backgrounds_media": "折りたまれたメディア付きテゥートをプレビュー",
"settings.image_backgrounds_users": "折りたまれたトゥートの背景を変更する",
"settings.media": "メディア",
"settings.media_letterbox": "メディアをレターボックス式で表示",
"settings.media_fullwidth": "全幅メディアプリビュー",
"settings.preferences": "ユーザー設定",
"settings.wide_view": "ワイドビュー(デスクトップレイアウトのみ)",
"settings.navbar_under": "ナビを画面下部に移動させる(モバイルレイアウトのみ)",
"status.collapse": "折りたたむ",
"status.uncollapse": "折りたたみを解除",
"notification.markForDeletion": "選択",
"notifications.clear": "通知を全てクリアする",
"notifications.marked_clear_confirmation": "削除した全ての通知を完全に削除してもよろしいですか?",
"notifications.marked_clear": "選択した通知を削除する",
"notification_purge.btn_all": "すべて\n選択",
"notification_purge.btn_none": "選択\n解除",
"notification_purge.btn_invert": "選択を\n反転",
"notification_purge.btn_apply": "選択したものを\n削除"
}

@ -1,44 +0,0 @@
{
"getting_started.open_source_notice": "Glitchsoc jest wolnym i otwartoźródłowym forkiem oprogramowania {Mastodon}. Możesz współtworzyć projekt lub zgłaszać błędy na GitHubie pod adresem {github}.",
"layout.auto": "Automatyczny",
"layout.current_is": "Twój obecny układ to:",
"layout.desktop": "Desktopowy",
"layout.mobile": "Mobilny",
"navigation_bar.app_settings": "Ustawienia aplikacji",
"getting_started.onboarding": "Rozejrzyj się",
"onboarding.page_one.federation": "{domain} jest 'instancją' Mastodona. Mastodon to sieć działających niezależnie serwerów tworzących jedną sieć społecznościową. Te serwery nazywane są instancjami.",
"onboarding.page_one.welcome": "Witamy na {domain}!",
"onboarding.page_six.github": "{domain} jest oparty na Glitchsoc. Glitchsoc jest {forkiem} {Mastodon}a kompatybilnym z każdym klientem i aplikacją Mastodona. Glitchsoc jest całkowicie wolnym i otwartoźródłowym oprogramowaniem. Możesz zgłaszać błędy i sugestie funkcji oraz współtworzyć projekt na {github}.",
"settings.auto_collapse": "Automatyczne zwijanie",
"settings.auto_collapse_all": "Wszystko",
"settings.auto_collapse_lengthy": "Długie wpisy",
"settings.auto_collapse_media": "Wpisy z zawartością multimedialną",
"settings.auto_collapse_notifications": "Powiadomienia",
"settings.auto_collapse_reblogs": "Podbicia",
"settings.auto_collapse_replies": "Odpowiedzi",
"settings.close": "Zamknij",
"settings.collapsed_statuses": "Zwijanie wpisów",
"settings.enable_collapsed": "Włącz zwijanie wpisów",
"settings.general": "Ogólne",
"settings.image_backgrounds": "Obrazy w tle",
"settings.image_backgrounds_media": "Wyświetlaj zawartość multimedialną zwiniętych wpisów",
"settings.image_backgrounds_users": "Nadaj tło zwiniętym wpisom",
"settings.media": "Zawartość multimedialna",
"settings.media_letterbox": "Letterbox media",
"settings.media_fullwidth": "Podgląd zawartości multimedialnej o pełnej szerokości",
"settings.preferences": "Preferencje użyytkownika",
"settings.wide_view": "Szeroki widok (tylko w trybie desktopowym)",
"settings.navbar_under": "Pasek nawigacji na dole (tylko w trybie mobilnym)",
"status.collapse": "Zwiń",
"status.uncollapse": "Rozwiń",
"notification.markForDeletion": "Oznacz do usunięcia",
"notifications.clear": "Wyczyść wszystkie powiadomienia",
"notifications.marked_clear_confirmation": "Czy na pewno chcesz bezpowrtonie usunąć wszystkie powiadomienia?",
"notifications.marked_clear": "Usuń zaznaczone powiadomienia",
"notification_purge.btn_all": "Zaznacz\nwszystkie",
"notification_purge.btn_none": "Odznacz\nwszystkie",
"notification_purge.btn_invert": "Odwróć\nzaznaczenie",
"notification_purge.btn_apply": "Usuń\nzaznaczone"
}

@ -0,0 +1,4 @@
en:
skins:
vanilla:
win95: Masto95

@ -15,6 +15,14 @@ class Themes
Dir.glob(Rails.root.join('app', 'javascript', 'flavours', '*', 'theme.yml')) do |path|
data = YAML.load_file(path)
name = File.basename(File.dirname(path))
if data['locales']
locales = []
Dir.glob(File.join(File.dirname(path), data['locales'], '*.{js,json}')) do |locale|
localeName = File.basename(locale, File.extname(locale))
locales.push(localeName) unless localeName.match(/defaultMessages|whitelist|index/)
end
data['locales'] = locales
end
if data['pack']
data['name'] = name
data['skin'] = { 'default' => [] }

@ -19,7 +19,11 @@
= title
= javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous'
= javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
- if @theme
- if @theme[:supported_locales].include? I18n.locale.to_s
= javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
- elsif @theme[:supported_locales].include? 'en'
= javascript_pack_tag "locales/#{@theme[:flavour]}/en", integrity: true, crossorigin: 'anonymous'
= csrf_meta_tags
= yield :header_tags

@ -27,8 +27,8 @@
.fields-group
- if Themes.instance.flavours.size > 1
= f.input :setting_flavour, collection: Themes.instance.flavours, label_method: lambda { |flavour| I18n.t("themes.#{flavour}", default: flavour) }, wrapper: :with_label, include_blank: false
= f.input :setting_skin, collection: Themes.instance.skins_for(current_flavour), label_method: lambda { |skin| I18n.t("themes.#{current_flavour}.skins.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false
= f.input :setting_flavour, collection: Themes.instance.flavours, label_method: lambda { |flavour| I18n.t("flavours.#{flavour}", default: flavour) }, wrapper: :with_label, include_blank: false
= f.input :setting_skin, collection: Themes.instance.skins_for(current_flavour), label_method: lambda { |skin| I18n.t("skins.#{current_flavour}.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false
= f.input :setting_unfollow_modal, as: :boolean, wrapper: :with_label
= f.input :setting_boost_modal, as: :boolean, wrapper: :with_label

@ -0,0 +1,6 @@
# frozen_string_literal: true
I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'flavours', '*', 'names.{rb,yml}').to_s]
I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'flavours', '*', 'names', '*.{rb,yml}').to_s]
I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'skins', '*', '*', 'names.{rb,yml}').to_s]
I18n.load_path += Dir[Rails.root.join('app', 'javascript', 'skins', '*', '*', 'names', '*.{rb,yml}').to_s]

@ -678,8 +678,6 @@ ca:
<p>Originalment adaptat a la <a href="https://github.com/discourse/discourse">política de privadesa del Discurs</a>.</p>
title: "%{instance} Condicions del servei i política de privadesa"
themes:
default: Mastodont
time:
formats:
default: "%b %d, %Y, %H:%M"

@ -687,8 +687,6 @@ en:
<p>Originally adapted from the <a href="https://github.com/discourse/discourse">Discourse privacy policy</a>.</p>
title: "%{instance} Terms of Service and Privacy Policy"
themes:
default: Mastodon
time:
formats:
default: "%b %d, %Y, %H:%M"

@ -678,8 +678,6 @@ es:
<p>Adaptado originalmente del <a href="https://github.com/discourse/discourse">discurso de las políticas de privacidad</a>.</p>
title: Términos del Servicio y Políticas de Privacidad de %{instance}
themes:
default: Mastodon
time:
formats:
default: "%d de %b del %Y, %H:%M"

@ -677,8 +677,6 @@ fr:
<p>Originellement adapté à partir de la politique de confidentialité de <a href="https://github.com/discourse/discourse">Discourse</a>.</p>
title: "%{instance} Conditions d’utilisations et politique de confidentialité"
themes:
default: Mastodon
time:
formats:
default: "%d %b %Y, %H:%M"

@ -693,8 +693,6 @@ pl:
<p>Tekst bazuje na <a href="https://github.com/discourse/discourse">polityce prywatności Discourse</a>.</p>
title: Zasady korzystania i polityka prywatności %{instance}
themes:
default: Mastodon
time:
formats:
default: "%b %d, %Y, %H:%M"

@ -30,6 +30,9 @@ for (let i = 0; i < flavourFiles.length; i++) {
if (!data.pack_directory) {
data.pack_directory = dirname(flavourFile);
}
if (data.locales) {
data.locales = join(dirname(flavourFile), data.locales);
}
if (data.pack && typeof data.pack === 'object') {
flavours[data.name] = data;
}
@ -45,7 +48,7 @@ for (let i = 0; i < skinFiles.length; i++) {
const data = flavours[name].skin;
if (lstatSync(skinFile).isDirectory()) {
data[skin] = {};
const skinPacks = glob.sync(resolve(skinFile, '*.{css,scss}'));
const skinPacks = glob.sync(join(skinFile, '*.{css,scss}'));
for (let j = 0; j < skinPacks.length; j++) {
const pack = skinPacks[i];
data[skin][basename(pack, extname(pack))] = pack;

@ -1,70 +1,66 @@
// A message from upstream:
// ========================
// To avoid adding a lot of boilerplate, locale packs are
// automatically generated here. These are written into the tmp/
// directory and then used to generate locale_en.js, locale_fr.js, etc.
const fs = require('fs');
const path = require('path');
// Glitch note:
// ============
// This code has been entirely rewritten to support glitch flavours.
// However, the underlying process is exactly the same.
const { existsSync, readdirSync, writeFileSync } = require('fs');
const { join, resolve } = require('path');
const rimraf = require('rimraf');
const mkdirp = require('mkdirp');
const { flavours } = require('./configuration.js');
const localesJsonPath = path.join(__dirname, '../../app/javascript/mastodon/locales');
const locales = fs.readdirSync(localesJsonPath).filter(filename => {
return /\.json$/.test(filename) &&
!/defaultMessages/.test(filename) &&
!/whitelist/.test(filename);
}).map(filename => filename.replace(/\.json$/, ''));
const outPath = path.join(__dirname, '../../tmp/packs');
rimraf.sync(outPath);
mkdirp.sync(outPath);
const outPaths = [];
locales.forEach(locale => {
const localePath = path.join(outPath, `locale_${locale}.js`);
const baseLocale = locale.split('-')[0]; // e.g. 'zh-TW' -> 'zh'
const localeDataPath = [
// first try react-intl
`../../node_modules/react-intl/locale-data/${baseLocale}.js`,
// then check locales/locale-data
`../../app/javascript/mastodon/locales/locale-data/${baseLocale}.js`,
// fall back to English (this is what react-intl does anyway)
'../../node_modules/react-intl/locale-data/en.js',
].filter(filename => fs.existsSync(path.join(outPath, filename)))
.map(filename => filename.replace(/..\/..\/node_modules\//, ''))[0];
let glitchInject = `
const mergedMessages = messages;
`;
const glitchPath = `../../app/javascript/glitch/locales/${locale}.json`;
if (fs.existsSync(path.join(outPath, glitchPath))) {
glitchInject = `
import glitchMessages from ${JSON.stringify(glitchPath)};
let mergedMessages = messages;
Object.keys(glitchMessages).forEach(function (key) {
mergedMessages[key] = glitchMessages[key];
});
`;
module.exports = Object.keys(flavours).reduce(function (map, entry) {
const flavour = flavours[entry];
if (!flavour.locales) {
return map;
}
const locales = readdirSync(flavour.locales).filter(
filename => /\.js(?:on)?$/.test(filename) && !/defaultMessages|whitelist|index/.test(filename)
);
const outPath = resolve('tmp', 'locales', entry);
rimraf.sync(outPath);
mkdirp.sync(outPath);
const localeContent = `//
// locale_${locale}.js
locales.forEach(function (locale) {
const localeName = locale.replace(/\.js(?:on)?$/, '');
const localePath = join(outPath, `${localeName}.js`);
const baseLocale = localeName.split('-')[0]; // e.g. 'zh-TW' -> 'zh'
const localeDataPath = [
// first try react-intl
`node_modules/react-intl/locale-data/${baseLocale}.js`,
// then check locales/locale-data
`app/javascript/locales/locale-data/${baseLocale}.js`,
// fall back to English (this is what react-intl does anyway)
'node_modules/react-intl/locale-data/en.js',
].filter(
filename => existsSync(filename)
).map(
filename => filename.replace(/(?:node_modules|app\/javascript)\//, '')
)[0];
const localeContent = `//
// locales/${entry}/${localeName}.js
// automatically generated by generateLocalePacks.js
//
import messages from '../../app/javascript/mastodon/locales/${locale}.json';
import localeData from ${JSON.stringify(localeDataPath)};
import { setLocale } from 'locales';
${glitchInject}
setLocale({messages: mergedMessages, localeData: localeData});
`;
fs.writeFileSync(localePath, localeContent, 'utf8');
outPaths.push(localePath);
});
module.exports = outPaths;
import messages from '../../../${flavour.locales}/${locale.replace(/\.js$/, '')}';
import localeData from '${localeDataPath}';
import { setLocale } from 'locales';
setLocale({
localeData,
messages,
});
`;
writeFileSync(localePath, localeContent, 'utf8');
map[`locales/${entry}/${localeName}`] = localePath;
});
return map;
}, {});

@ -1,13 +1,12 @@
// Note: You must restart bin/webpack-dev-server for changes to take effect
const webpack = require('webpack');
const { basename, join, resolve } = require('path');
const { join, resolve } = require('path');
const { sync } = require('glob');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const extname = require('path-complete-extname');
const { env, settings, core, flavours, output, loadersDir } = require('./configuration.js');
const localePackPaths = require('./generateLocalePacks');
const localePacks = require('./generateLocalePacks');
function reducePacks (data, into = {}) {
if (!data.pack) {
@ -48,11 +47,7 @@ function reducePacks (data, into = {}) {
module.exports = {
entry: Object.assign(
{ locales: resolve('app', 'javascript', 'locales') },
localePackPaths.reduce((map, entry) => {
const localMap = map;
localMap[basename(entry, extname(entry, extname(entry)))] = resolve(entry);
return localMap;
}, {}),
localePacks,
reducePacks(core),
Object.keys(flavours).reduce((map, entry) => reducePacks(flavours[entry], map), {})
),

Loading…
Cancel
Save