From 97b37ba8639fc3c3771bafa7ccd2a246f6e57e8a Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 19 Jul 2017 09:55:45 +0530 Subject: [PATCH] Use a plugin to read data files from gem - jekyll-data v1.x - jekyll 3.5 automatically requires a theme's runtime deps - jekyll v3.5.0 had bugs. Hence use v3.5.1 and beyond --- Rakefile | 1 + minimal-mistakes-jekyll.gemspec | 5 +- test/_data/ui-text.yml | 582 -------------------------------- 3 files changed, 4 insertions(+), 584 deletions(-) delete mode 100644 test/_data/ui-text.yml diff --git a/Rakefile b/Rakefile index e50d89f84779..921330e6ab79 100644 --- a/Rakefile +++ b/Rakefile @@ -44,6 +44,7 @@ task :preview do ENV["LISTEN_GEM_DEBUGGING"] = "1" listener = Listen.to( + base.join("_data"), base.join("_includes"), base.join("_layouts"), base.join("_sass"), diff --git a/minimal-mistakes-jekyll.gemspec b/minimal-mistakes-jekyll.gemspec index 4e727cce3b8e..c36a586edd7c 100644 --- a/minimal-mistakes-jekyll.gemspec +++ b/minimal-mistakes-jekyll.gemspec @@ -12,14 +12,15 @@ Gem::Specification.new do |spec| spec.metadata["plugin_type"] = "theme" spec.files = `git ls-files -z`.split("\x0").select do |f| - f.match(%r{^(assets|_(includes|layouts|sass)/|(LICENSE|README|CHANGELOG)((\.(txt|md|markdown)|$)))}i) + f.match(%r{^(assets|_(data|includes|layouts|sass)/|(LICENSE|README|CHANGELOG)((\.(txt|md|markdown)|$)))}i) end - spec.add_runtime_dependency "jekyll", "~> 3.4" + spec.add_runtime_dependency "jekyll", "~> 3.5", ">= 3.5.1" spec.add_runtime_dependency "jekyll-paginate", "~> 1.1" spec.add_runtime_dependency "jekyll-sitemap", "~> 1.0" spec.add_runtime_dependency "jekyll-gist", "~> 1.4" spec.add_runtime_dependency "jekyll-feed", "~> 0.9.2" + spec.add_runtime_dependency "jekyll-data", "~> 1.0" spec.add_runtime_dependency "jemoji", "~> 0.8" spec.add_development_dependency "bundler", "~> 1.12" diff --git a/test/_data/ui-text.yml b/test/_data/ui-text.yml deleted file mode 100644 index b3cbec0942b5..000000000000 --- a/test/_data/ui-text.yml +++ /dev/null @@ -1,582 +0,0 @@ -# User interface text and labels - -# English (default) -# ----------------- -en: &DEFAULT_EN - page : "Page" - pagination_previous : "Previous" - pagination_next : "Next" - breadcrumb_home_label : "Home" - breadcrumb_separator : "/" - menu_label : "Toggle Menu" - toc_label : "On This Page" - ext_link_label : "Direct Link" - less_than : "less than" - minute_read : "minute read" - share_on_label : "Share on" - meta_label : - tags_label : "Tags:" - categories_label : "Categories:" - date_label : "Updated:" - comments_label : "Leave a Comment" - comments_title : "Comments" - more_label : "Learn More" - related_label : "You May Also Enjoy" - follow_label : "Follow:" - feed_label : "Feed" - powered_by : "Powered by" - website_label : "Website" - email_label : "Email" - recent_posts : "Recent Posts" - undefined_wpm : "Undefined parameter words_per_minute at _config.yml" - comment_form_info : "Your email address will not be published. Required fields are marked" - comment_form_comment_label : "Comment" - comment_form_md_info : "Markdown is supported." - comment_form_name_label : "Name" - comment_form_email_label : "Email address" - comment_form_website_label : "Website (optional)" - comment_btn_submit : "Submit Comment" - comment_btn_submitted : "Submitted" - comment_success_msg : "Thanks for your comment! It will show on the site once it has been approved." - comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." - loading_label : "Loading..." -en-US: - <<: *DEFAULT_EN -en-CA: - <<: *DEFAULT_EN -en-GB: - <<: *DEFAULT_EN -en-AU: - <<: *DEFAULT_EN - -# Spanish -# -------------- -es: &DEFAULT_ES - page : "Página" - pagination_previous : "Anterior" - pagination_next : "Siguiente" - breadcrumb_home_label : "Inicio" - breadcrumb_separator : "/" - menu_label : - toc_label : "Contenidos" - ext_link_label : "Enlace" - less_than : "menos de" - minute_read : "minuto de lectura" - share_on_label : "Compartir" - meta_label : - tags_label : "Etiquetas:" - categories_label : "Categorías:" - date_label : "Actualizado:" - comments_label : "Comentar" - comments_title : - more_label : "Ver más" - related_label : "Podrías ver también" - follow_label : "Seguir:" - feed_label : "Feed" - powered_by : "Powered by" - website_label : "Sitio web" - email_label : "Email" - recent_posts : "Entradas recientes" - undefined_wpm : "Parametro words_per_minute (Palabras por minuto) no definido en _config.yml" - comment_form_info : - comment_form_comment_label : - comment_form_md_info : - comment_form_name_label : - comment_form_email_label : - comment_form_website_label : - comment_btn_submit : - comment_btn_submitted : - comment_success_msg : - comment_error_msg : - loading_label : -es-ES: - <<: *DEFAULT_ES -es-CO: - <<: *DEFAULT_ES - -# French -# ----------------- -fr: &DEFAULT_FR - page : "Page" - pagination_previous : "Précédent" - pagination_next : "Suivant" - breadcrumb_home_label : "Accueil" - breadcrumb_separator : "/" - menu_label : - toc_label : "Sur cette page" - ext_link_label : "Lien direct" - less_than : "moins de" - minute_read : "minute de lecture" - share_on_label : "Partager sur" - meta_label : - tags_label : "Tags :" - categories_label : "Catégories :" - date_label : "Mis à jour :" - comments_label : "Laisser un commentaire" - comments_title : - more_label : "Lire plus" - related_label : "Vous pourriez aimer aussi" - follow_label : "Contact" - feed_label : "Flux" - powered_by : "Propulsé par" - website_label : "Site" - email_label : "Email" - recent_posts : "Posts récents" - undefined_wpm : "Le paramètre words_per_minute n'est pas défini dans _config.yml" - comments_title : "Commentaires" - comment_form_info : "Votre adresse email ne sera pas visible. Les champs obligatoires sont marqués" - comment_form_comment_label : "Commentaire" - comment_form_md_info : "Markdown est supporté." - comment_form_name_label : "Nom" - comment_form_email_label : "Adresse mail" - comment_form_website_label : "Site web (optionnel)" - comment_btn_submit : "Envoyer" - comment_btn_submitted : "Envoyé" - comment_success_msg : "Merci pour votre commentaire, il sera visible sur le site une fois approuvé." - comment_error_msg : "Désolé, une erreur est survenue lors de la soumission. Vérifiez que les champs obligatoires ont été remplis et réessayez." - loading_label : "Chargement..." -fr-FR: - <<: *DEFAULT_FR -fr-BE: - <<: *DEFAULT_FR -fr-CH: - <<: *DEFAULT_FR - -# Turkish -# ----------------- -tr: &DEFAULT_TR - page : "Sayfa" - pagination_previous : "Önceki" - pagination_next : "Sonraki" - breadcrumb_home_label : "Ana Sayfa" - breadcrumb_separator : "/" - menu_label : - toc_label : "İçindekiler" - ext_link_label : "Doğrudan Bağlantı" - less_than : "Şu süreden az: " - minute_read : "dakika tahmini okuma süresi" - share_on_label : "Paylaş" - meta_label : - tags_label : "Etiketler:" - categories_label : "Kategoriler:" - date_label : "Güncelleme tarihi:" - comments_label : "Yorum yapın" - comments_title : "Yorumlar" - more_label : "Daha fazlasını öğrenin" - related_label : "Bunlar ilginizi çekebilir:" - follow_label : "Takip et:" - feed_label : "RSS" - powered_by : "Emeği geçenler: " - website_label : "Web sayfası" - email_label : "E-posta" - recent_posts : "Son yazılar" - undefined_wpm : "_config.yml dosyasında tanımlanmamış words_per_minute parametresi" - comment_form_info : "Email adresiniz gösterilmeyecektir. Zorunlu alanlar işaretlenmiştir" - comment_form_comment_label : "Yorumunuz" - comment_form_md_info : "Markdown desteklenmektedir." - comment_form_name_label : "Adınız" - comment_form_email_label : "Email adresiniz" - comment_form_website_label : "Websiteniz (opsiyonel)" - comment_btn_submit : "Yorum Yap" - comment_btn_submitted : "Gönderildi" - comment_success_msg : "Yorumunuz için teşekkürler! Yorumunuz onaylandıktan sonra sitede gösterilecektir." - comment_error_msg : "Maalesef bir hata oluştu. Lütfen zorunlu olan tüm alanları doldurduğunuzdan emin olun ve sonrasında tekrar deneyin." - loading_label : "Yükleniyor..." -tr-TR: - <<: *DEFAULT_TR - -# Portuguese -# ----------------- -pt: &DEFAULT_PT - page : "Página" - pagination_previous : "Anterior" - pagination_next : "Seguinte" - breadcrumb_home_label : "Início" - breadcrumb_separator : "/" - menu_label : - toc_label : "Nesta Página" - ext_link_label : "Link Direto" - less_than : "menos de" - minute_read : "minutos de leitura" - share_on_label : "Partilhar no" - meta_label : - tags_label : "Etiquetas:" - categories_label : "Categorias:" - date_label : "Atualizado:" - comments_label : "Deixe um Comentário" - comments_title : "Comentários" - more_label : "Saber mais" - related_label : "Também pode gostar de" - follow_label : "Siga:" - feed_label : "Feed" - powered_by : "Feito com" - website_label : "Site" - email_label : "Email" - recent_posts : "Artigos Recentes" - undefined_wpm : "Parâmetro words_per_minute não definido em _config.yml" - comment_form_info : "O seu endereço email não será publicado. Os campos obrigatórios estão assinalados" - comment_form_comment_label : "Comentário" - comment_form_md_info : "Markdown é suportado." - comment_form_name_label : "Nome" - comment_form_email_label : "Endereço Email" - comment_form_website_label : "Site (opcional)" - comment_btn_submit : "Sumbeter Comentário" - comment_btn_submitted : "Submetido" - comment_success_msg : "Obrigado pelo seu comentário! Será visível no site logo que aprovado." - comment_error_msg : "Lamento, ocorreu um erro na sua submissão. Por favor verifique se todos os campos obrigatórios estão corretamente preenchidos e tente novamente." - loading_label : "A carregar..." -# Brazilian Portuguese -pt-BR: - page : "Página" - pagination_previous : "Anterior" - pagination_next : "Próxima" - breadcrumb_home_label : "Home" - breadcrumb_separator : "/" - menu_label : - toc_label : "Nesta página" - ext_link_label : "Link direto" - less_than : "meno que" - minute_read : "minutos de leitura" - share_on_label : "Compartilhe em" - meta_label : - tags_label : "Tags:" - categories_label : "Categorias:" - date_label : "Atualizado em:" - comments_label : "Deixe um comentário" - comments_title : - more_label : "Aprenda Mais" - related_label : "Você Talvez Goste Também" - follow_label : "Acompanhe em" - feed_label : "Feed" - powered_by : "Feito com" - website_label : "Site" - email_label : "Email" - recent_posts : "Postagens recentes" - undefined_wpm : "Parâmetro indefinido em word_per_minute no _config.yml" - comment_form_info : - comment_form_comment_label : - comment_form_md_info : - comment_form_name_label : - comment_form_email_label : - comment_form_website_label : - comment_btn_submit : - comment_btn_submitted : - comment_success_msg : - comment_error_msg : - loading_label : -pt-PT: - <<: *DEFAULT_PT - -# Italian -# ----------------- -it: &DEFAULT_IT - page : "Pagina" - pagination_previous : "Precedente" - pagination_next : "Prossima" - breadcrumb_home_label : "Home" - breadcrumb_separator : "/" - menu_label : - toc_label : "Indice della pagina" - ext_link_label : "Link" - less_than : "meno di" - minute_read : "minuto/i di lettura" - share_on_label : "Condividi" - meta_label : - tags_label : "Tags:" - categories_label : "Categorie:" - date_label : "Aggiornato:" - comments_label : "Scrivi un commento" - comments_title : - more_label : "Scopri di più" - related_label : "Potrebbe Piacerti Anche" - follow_label : "Segui:" - feed_label : "Feed" - powered_by : "Powered by" - website_label : "Website" - email_label : "Email" - recent_posts : "Articoli Recenti" - undefined_wpm : "Parametro words_per_minute non definito in _config.yml" - comment_form_info : "Il tuo indirizzo email non sarà pubblicato. Sono segnati i campi obbligatori" - comment_form_comment_label : "Commenta" - comment_form_md_info : "Il linguaggio Markdown è supportato" - comment_form_name_label : "Nome" - comment_form_email_label : "Indirizzo email" - comment_form_website_label : "Sito Web (opzionale)" - comment_btn_submit : "Invia commento" - comment_btn_submitted : "Inviato" - comment_success_msg : "Grazie per il tuo commento! Verrà visualizzato nel sito una volta che sarà approvato." - comment_error_msg : "C'è stato un errore con il tuo invio. Assicurati che tutti i campi richiesti siano stati completati e riprova." - loading_label : "Caricamento..." -it-IT: - <<: *DEFAULT_IT - -# Chinese (zh-CN Chinese - China) -# ----------------- -zh: &DEFAULT_ZH - page : "页面" - pagination_previous : "向前" - pagination_next : "向后" - breadcrumb_home_label : "首页" - breadcrumb_separator : "/" - menu_label : "切换菜单" - toc_label : "在本页上" - ext_link_label : "直接链接" - less_than : "少于" - minute_read : "分钟 阅读" - share_on_label : "分享" - meta_label : - tags_label : "标签:" - categories_label : "分类:" - date_label : "最新的:" - comments_label : "留下评论" - comments_title : "评论" - more_label : "了解更多" - related_label : "猜您还喜欢" - follow_label : "关注:" - feed_label : "Feed" - powered_by : "技术来自于" - website_label : "网站" - email_label : "电子邮箱" - recent_posts : "最新文章" - undefined_wpm : "_config.yml配置中words_per_minute字段未定义" - comment_form_info : "您的电子邮箱地址并不会被展示。请填写标记为必须的字段。" - comment_form_comment_label : "评论" - comment_form_md_info : "Markdown语法已支持。" - comment_form_name_label : "姓名" - comment_form_email_label : "电子邮箱" - comment_form_website_label : "网站(可选)" - comment_btn_submit : "提交评论" - comment_btn_submitted : "已提交" - comment_success_msg : "感谢您的评论!被批准后它会立即在此站点展示。" - comment_error_msg : "很抱歉,您的提交存在错误。请确保所有必填字段都已填写正确,然后再试一次。" - loading_label : "正在加载..." -zh-CN: - <<: *DEFAULT_ZH -zh-HK: - <<: *DEFAULT_ZH -zh-SG: - <<: *DEFAULT_ZH -# Taiwan (Traditional Chinese) -zh-TW: - page : "頁面" - pagination_previous : "較舊" - pagination_next : "較新" - breadcrumb_home_label : "首頁" - breadcrumb_separator : "/" - menu_label : "切換選單" - toc_label : "本頁" - ext_link_label : "外部連結" - less_than : "少於" - minute_read : "分鐘閱讀" - share_on_label : "分享到" - meta_label : - tags_label : "標籤:" - categories_label : "分類:" - date_label : "更新時間:" - comments_label : "留言" - comments_title : "留言內容" - more_label : "了解更多" - related_label : "猜您有與趣" - follow_label : "追蹤:" - feed_label : "RSS Feed" - powered_by : "Powered by" - website_label : "網站" - email_label : "電子信箱" - recent_posts : "最新文章" - undefined_wpm : "_config.yml 中未定義 words_per_minute" - comment_form_info : "您的電子信箱不會被公開. 必填部份已標記" - comment_form_comment_label : "留言內容" - comment_form_md_info : "支援Markdown語法。" - comment_form_name_label : "名字" - comment_form_email_label : "電子信箱帳號" - comment_form_website_label : "網頁 (可選填)" - comment_btn_submit : "送出留言" - comment_btn_submitted : "已送出" - comment_success_msg : "感謝您的留言! 審核後將會顯示在站上。" - comment_error_msg : "抱歉,部份資料輸入有問題。請確認資料填寫正確後再試一次。" - loading_label : "載入中..." - -# German / Deutsch -# ----------------- -de: &DEFAULT_DE - page : "Seite" - pagination_previous : "Vorherige" - pagination_next : "Nächste" - breadcrumb_home_label : "Home" - breadcrumb_separator : "/" - menu_label : - toc_label : "Auf dieser Seite" - ext_link_label : "Direkter Link" - less_than : "weniger als" - minute_read : "Minuten zum lesen" - share_on_label : "Teilen auf" - meta_label : - tags_label : "Tags:" - categories_label : "Kategorien:" - date_label : "Aktualisiert:" - comments_label : "Hinterlassen sie einen Kommentar" - comments_title : "Kommentare" - more_label : "Mehr anzeigen" - related_label : "Ihnen gefällt vielleicht auch" - follow_label : "Folgen:" - feed_label : "Feed" - powered_by : "Powered by" - website_label : "Webseite" - email_label : "E-Mail" - recent_posts : "Aktuelle Beiträge" - undefined_wpm : "Undefinierter Parameter words_per_minute in _config.yml" - comment_form_info : "Ihre E-Mail Adresse wird nicht veröffentlicht. Benötigte Felder sind markiert" - comment_form_comment_label : "Kommentar" - comment_form_md_info : "Markdown wird unterstützt." - comment_form_name_label : "Name" - comment_form_email_label : "E-Mail Addresse" - comment_form_website_label : "Webseite (optional)" - comment_btn_submit : "Kommentar absenden" - comment_btn_submitted : "Versendet" - comment_success_msg : "Danke für ihren Kommentar! Er wird auf der Seite angezeigt, nachdem er geprüft wurde." - comment_error_msg : "Entschuldigung, es gab einen Fehler. Bitte füllen sie alle benötigten Felder aus und versuchen sie es erneut." - loading_label : "Lade..." -de-DE: - <<: *DEFAULT_DE -de-AT: - <<: *DEFAULT_DE -de-CH: - <<: *DEFAULT_DE -de-BE: - <<: *DEFAULT_DE -de-LI: - <<: *DEFAULT_DE -de-LU: - <<: *DEFAULT_DE - -# Nepali (Nepal) -# ----------------- -ne: &DEFAULT_NE - page : "पृष्‍ठ" - pagination_previous : "अघिल्लो" - pagination_next : "अर्को" - breadcrumb_home_label : "गृह" - breadcrumb_separator : "/" - menu_label : "टगल मेनु" - toc_label : "यो पृष्‍ठमा" - ext_link_label : "सिधा सम्पर्क" - less_than : "कम्तिमा" - minute_read : "मिनेट पढ्नुहोस्" - share_on_label : "शेयर गर्नुहोस्" - meta_label : - tags_label : "ट्यागहरू:" - categories_label : "वर्गहरु:" - date_label : "अद्यावधिक:" - comments_label : "टिप्पणी दिनुहोस्" - comments_title : "टिप्पणीहरू" - more_label : "अझै सिक्नुहोस्" - related_label : "तपाईं रुचाउन सक्नुहुन्छ " - follow_label : "पछ्याउनुहोस्:" - feed_label : "फिड" - powered_by : "Powered by" - website_label : "वेबसाइट" - email_label : "इमेल" - recent_posts : "ताजा लेखहरु" - undefined_wpm : "अपरिभाषित प्यारामिटर शब्दहरू_प्रति_मिनेट at _config.yml" - comment_form_info : "तपाइँको इमेल ठेगाना प्रकाशित गरिने छैन।आवश्यक जानकारीहरुमा चिन्ह लगाइको छ" - comment_form_comment_label : "टिप्पणी" - comment_form_md_info : "मार्कडाउन समर्थित छ।" - comment_form_name_label : "नाम" - comment_form_email_label : "इमेल ठेगाना" - comment_form_website_label : "वेबसाइट (वैकल्पिक)" - comment_btn_submit : "टिप्पणी दिनुहोस् " - comment_btn_submitted : "टिप्पणी भयो" - comment_success_msg : "तपाईंको टिप्पणीको लागि धन्यवाद! एक पटक यो अनुमोदन गरेपछी यो साइटमा देखाउनेछ।" - comment_error_msg : "माफ गर्नुहोस्, तपाईंको टिप्पणी त्रुटि थियो।सबै आवश्यक जानकारीहरु पूरा गरिएको छ भने निश्चित गर्नुहोस् र फेरि प्रयास गर्नुहोस्।" - loading_label : "लोड हुँदैछ ..." -ne-NP: - <<: *DEFAULT_NE - -# Korean -# -------------- -ko: &DEFAULT_KO - page : "페이지" - pagination_previous : "이전" - pagination_next : "다음" - breadcrumb_home_label : "Home" - breadcrumb_separator : "/" - menu_label : "토글 메뉴" - toc_label : "On This Page" - ext_link_label : "직접 링크" - less_than : "최대" - minute_read : "분 소요" - share_on_label : "공유하기" - meta_label : - tags_label : "태그:" - categories_label : "카테고리:" - date_label : "업데이트:" - comments_label : "댓글남기기" - comments_title : "댓글" - more_label : "더 보기" - related_label : "참고" - follow_label : "팔로우:" - feed_label : "피드" - powered_by : "Powered by" - website_label : "웹사이트" - email_label : "이메일" - recent_posts : "최근 포스트" - undefined_wpm : "Undefined parameter words_per_minute at _config.yml" - comment_form_info : "이메일은 공개되지 않습니다. 작성 필요 필드:" - comment_form_comment_label : "댓글" - comment_form_md_info : "마크다운을 지원합니다." - comment_form_name_label : "이름" - comment_form_email_label : "이메일" - comment_form_website_label : "웹사이트(선택사항)" - comment_btn_submit : "댓글 등록" - comment_btn_submitted : "등록됨" - comment_success_msg : "감사합니다! 댓글이 머지된 후 확인하실 수 있습니다." - comment_error_msg : "댓글 등록에 문제가 있습니다. 필요 필드를 작성했는지 확인하고 다시 시도하세요." - loading_label : "로딩중..." -ko-KR: - <<: *DEFAULT_KO - -# Russian / Русский -# ----------------- -ru: &DEFAULT_RU - page : "Страница" - pagination_previous : "Предыдущая" - pagination_next : "Следующая" - breadcrumb_home_label : "Главная" - breadcrumb_separator : "/" - menu_label : "Выпадающее меню" - toc_label : "Содержание" - ext_link_label : "Прямая ссылка" - less_than : "менее" - minute_read : "мин на чтение" - share_on_label : "Поделиться" - meta_label : - tags_label : "Метки:" - categories_label : "Разделы:" - date_label : "Дата изменения:" - comments_label : "Оставить комментарий" - comments_title : "Комментарии" - more_label : "Читать далее" - related_label : "Вам также может понравиться" - follow_label : "Связаться со мной:" - feed_label : "RSS-лента" - powered_by : "Сайт работает на" - website_label : "Сайт" - email_label : "Электронная почта" - recent_posts : "Свежие записи" - undefined_wpm : "Не определён параметр words_per_minute в _config.yml" - comment_form_info : "Ваш адрес электронной почты не будет опубликован. Обязательные поля помечены" - comment_form_comment_label : "Комментарий" - comment_form_md_info : "Поддерживается синтаксис Markdown." - comment_form_name_label : "Имя" - comment_form_email_label : "Электронная почта" - comment_form_website_label : "Ссылка на сайт (необязательно)" - comment_btn_submit : "Оставить комментарий" - comment_btn_submitted : "Отправлено" - comment_success_msg : "Спасибо за Ваш комментарий! Он будет опубликован на сайте после проверки." - comment_error_msg : "К сожалению, произошла ошибка с отправкой комментария. Пожалуйста, убедитесь, что все обязательные поля заполнены и попытайтесь снова." - loading_label : "Отправка..." -ru-RU: - <<: *DEFAULT_RU - -# Another locale -# -------------- \ No newline at end of file