Skip to content

Commit

Permalink
Move lang to locale for dashboard overview part
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick Francois committed Oct 9, 2013
1 parent 05e3141 commit 5a65699
Show file tree
Hide file tree
Showing 35 changed files with 180 additions and 232 deletions.
21 changes: 3 additions & 18 deletions app/helpers/admin/dashboard_helper.rb
@@ -1,24 +1,9 @@
module Admin::DashboardHelper
def dashboard_theme_link
return unless current_user.can_access_to_themes?
_("You can also do a bit of design, %s or %s." ,
link_to(_("change your blog presentation"), :controller => 'themes') ,
link_to(_("enable plugins"), :controller => 'sidebar'))
end

def dashboard_sidebar_link
return unless current_user.can_access_to_customizesidebar?
_("You can also %s to customize your Publify blog.",
link_to(_('download some plugins'), 'http://plugins.publify.co'))
end

def dashboard_action_links
links = []

links << link_to(_('write a post'), :controller => 'content', :action => 'new') if current_user.can_access_to_articles?
links << link_to(_('write a page'), :controller => 'pages', :action => 'new') if current_user.can_access_to_pages?
links << link_to(_("update your profile or change your password"), :controller => 'profiles', :action => 'index') if current_user.can_access_to_profile?

links << link_to(t('.write_a_post'), controller: 'content', action: 'new') if current_user.can_access_to_articles?
links << link_to(t('.write_a_page'), controller: 'pages', action: 'new') if current_user.can_access_to_pages?
links << link_to(t(".update_your_profile_or_change_your_password"), controller: 'profiles', action: 'index') if current_user.can_access_to_profile?
links.join(', ')
end
end
13 changes: 7 additions & 6 deletions app/views/admin/dashboard/_overview.html.erb
@@ -1,12 +1,13 @@
<div class='alert alert-info'>
<p>
<%= _("This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %s", dashboard_action_links) %>
</p>
<p>
<%= dashboard_theme_link %>
<%= t(".dashboard_explain", available_actions: dashboard_action_links) %>
</p>
<%- if current_user.can_access_to_themes? %>
<p>
<%= t(".customization_explain", theme_link: link_to(t(".change_your_blog_presentation"), controller: 'themes'), sidebar_link: link_to(t(".enable_plugins"), controller: 'sidebar')) %>
</p>
<%- end %>
<p>
<%= _("If you need help, %s.",
link_to(_('read our documentation'), 'http://publify.co')) %> <%= dashboard_sidebar_link %>
<%= t(".help_explain", doc_link: link_to(t('.read_our_documentation'), 'http://publify.co')) %>
</p>
</div>
10 changes: 10 additions & 0 deletions config/locales/da.yml
Expand Up @@ -6,6 +6,16 @@ da:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "Dette sted giver dig en hurtig oversigt over, hvad der sker på din Publify blog, og hvad du kan gøre. Måske du ønsker at %{available_actions}."
write_a_post: "skrive en artikel"
write_a_page: "skrive en side"
update_your_profile_or_change_your_password: "opdatere din profil eller rette dit kodeord"
customization_explain: "Du kan også tilpasse designet, %{theme_link} eller %{sidebar_link}."
change_your_blog_presentation: "ændre din blogs udseende"
enable_plugins: "tilføje plugins"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Indkomne links"
you_have_no_internet_connection: "Du har ingen internet forbindelse"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/de.yml
Expand Up @@ -6,6 +6,16 @@ de:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %{available_actions}"
write_a_post: "write a post"
write_a_page: "eine Seite schreiben"
update_your_profile_or_change_your_password: "update your profile or change your password"
customization_explain: "You can also do a bit of design, %{theme_link} or %{sidebar_link}."
change_your_blog_presentation: "change your blog presentation"
enable_plugins: "enable plugins"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Inbound links"
you_have_no_internet_connection: "You have no internet connection"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/en.yml
Expand Up @@ -6,6 +6,16 @@ en:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %{available_actions}"
write_a_post: "write a post"
write_a_page: "write a page"
update_your_profile_or_change_your_password: "update your profile or change your password"
customization_explain: "You can also do a bit of design, %{theme_link} or %{sidebar_link}."
change_your_blog_presentation: "change your blog presentation"
enable_plugins: "enable plugins"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Inbound links"
you_have_no_internet_connection: "You have no internet connection"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/es-MX.yml
Expand Up @@ -6,6 +6,16 @@ es-MX:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %{available_actions}"
write_a_post: "write a post"
write_a_page: "write a page"
update_your_profile_or_change_your_password: "update your profile or change your password"
customization_explain: "You can also do a bit of design, %{theme_link} or %{sidebar_link}."
change_your_blog_presentation: "change your blog presentation"
enable_plugins: "enable plugins"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Inbound links"
you_have_no_internet_connection: "You have no internet connection"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/fr.yml
Expand Up @@ -6,6 +6,16 @@ fr:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "Voici un rapide aperçu de ce que peut faire votre blog Publify. Peux-être voulez vous %{available_actions}"
write_a_post: "écrire un article"
write_a_page: "publier une page statique"
update_your_profile_or_change_your_password: "mettre votre profil à jour ou changer votre mot de passe"
customization_explain: "Vous pouvez également faire un peu de personnalisation, %{theme_link}, %{sidebar_link}"
change_your_blog_presentation: "changer l'apparence de votre blog"
enable_plugins: "activer des plugins"
help_explain: "Si vous avez besoin d'aide, vous pouvez %{doc_link}."
read_our_documentation: "consulter notre documentation"
inbound:
inbound_links: "Liens entrants"
you_have_no_internet_connection: "Vous n'avez pas de connexion à internet"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/he-IL.yml
Expand Up @@ -6,6 +6,16 @@ he-IL:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %{available_actions}"
write_a_post: "לכתוב כתבה"
write_a_page: "לכתוב דף"
update_your_profile_or_change_your_password: "update your profile or change your password"
customization_explain: "תוכל גם %{theme_link} או %{sidebar_link}"
change_your_blog_presentation: "change your blog presentation"
enable_plugins: "לאפשר תוספים"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Inbound links"
you_have_no_internet_connection: "You have no internet connection"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/it.yml
Expand Up @@ -6,6 +6,16 @@ it:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %{available_actions}"
write_a_post: "write a post"
write_a_page: "write a page"
update_your_profile_or_change_your_password: "update your profile or change your password"
customization_explain: "You can also do a bit of design, %{theme_link} or %{sidebar_link}."
change_your_blog_presentation: "change your blog presentation"
enable_plugins: "enable plugins"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Inbound links"
you_have_no_internet_connection: "You have no internet connection"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/ja.yml
Expand Up @@ -6,6 +6,16 @@ ja:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %{available_actions}"
write_a_post: "記事を投稿する"
write_a_page: "ページを作成する"
update_your_profile_or_change_your_password: "プロフィールを編集したりパスワードを変更する"
customization_explain: "You can also do a bit of design, %{theme_link} or %{sidebar_link}."
change_your_blog_presentation: "change your blog presentation"
enable_plugins: "enable plugins"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "外部からのリンク"
you_have_no_internet_connection: "インターネットに接続できません"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/lt.yml
Expand Up @@ -6,6 +6,16 @@ lt:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %{available_actions}"
write_a_post: "write a post"
write_a_page: "write a page"
update_your_profile_or_change_your_password: "update your profile or change your password"
customization_explain: "You can also do a bit of design, %{theme_link} or %{sidebar_link}."
change_your_blog_presentation: "change your blog presentation"
enable_plugins: "enable plugins"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Inbound links"
you_have_no_internet_connection: "You have no internet connection"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/nb-NO.yml
Expand Up @@ -6,6 +6,16 @@ nb-NO:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "Dette stedet gir deg en rask oversikt over hva som foregår på din Publify-blogg og hva du kan gjøre. Kanskje du ønsker å %{availabel_actions}."
write_a_post: "skrive en artikkel"
write_a_page: "skrive en side"
update_your_profile_or_change_your_password: "oppdatere profilen din eller endre passordet ditt"
customization_explain: "Du kan også tilpasse utseendet, %{theme_link} eller %{sidebar_link}."
change_your_blog_presentation: "endre utseende på bloggen din"
enable_plugins: "aktivere plugins"
help_explain: "Hvis du behøver hjelp, %{doc_link}."
read_our_documentation: "les dokumentasjonen vår"
inbound:
inbound_links: "Innkommende lenker"
you_have_no_internet_connection: "Du har ingen internettforbindelse"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/nl.yml
Expand Up @@ -6,6 +6,16 @@ nl:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "Deze pagina geeft je een snel overzicht van wat er gebeurt op je Type blog en wat je doen kunt. Misschien wil je %{available_actions}"
write_a_post: "een post schrijven"
write_a_page: "een pagina schrijven"
update_your_profile_or_change_your_password: "je profiel bijwerken of je wachtwoord wijzigen"
customization_explain: "Je kunt ook wat design doen, %{theme_link} of %{sidebar_link}"
change_your_blog_presentation: "je blog presentatie aanpassen"
enable_plugins: "plugins instellen"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Binnenkomende links"
you_have_no_internet_connection: "Je hebt geen internetverbinding"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/pl.yml
Expand Up @@ -6,6 +6,16 @@ pl:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %{available_actions}"
write_a_post: "utworzyć wpis"
write_a_page: "utworzyć stronę"
update_your_profile_or_change_your_password: "zaktualizować profil lub zmienić hasło"
customization_explain: "Możesz również trochę poprojektować wygląd, %{theme_link} lub %{sidebar_link}."
change_your_blog_presentation: "zmienić wygląd swojego bloga"
enable_plugins: "aktywować wtyczkę"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Linki przychodzące"
you_have_no_internet_connection: "Nie masz połączenia internetowego"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/pt-BR.yml
Expand Up @@ -6,6 +6,16 @@ pt-BR:
last: "Anterior"
admin:
dashboard:
overview:
dashboard_explain: "This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %{available_actions}"
write_a_post: "write a post"
write_a_page: "write a page"
update_your_profile_or_change_your_password: "update your profile or change your password"
customization_explain: "You can also do a bit of design, %{theme_link} or %{sidebar_link}."
change_your_blog_presentation: "change your blog presentation"
enable_plugins: "enable plugins"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Inbound links"
you_have_no_internet_connection: "You have no internet connection"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/ro.yml
Expand Up @@ -6,6 +6,16 @@ ro:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %{available_actions}"
write_a_post: "write a post"
write_a_page: "write a page"
update_your_profile_or_change_your_password: "update your profile or change your password"
customization_explain: "You can also do a bit of design, %{theme_link} or %{sidebar_link}."
change_your_blog_presentation: "change your blog presentation"
enable_plugins: "enable plugins"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "read our documentation"
inbound:
inbound_links: "Inbound links"
you_have_no_internet_connection: "You have no internet connection"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/ru.yml
Expand Up @@ -6,6 +6,16 @@ ru:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "Здесь можно посмотреть, что происходит в вашем Publify-блоге и что в нем можно сделать. Возможно, вы хотели бы %{available_actions}."
write_a_post: "написать пост"
write_a_page: "создать страницу"
update_your_profile_or_change_your_password: "изменить свой профиль или поменять пароль"
customization_explain: "Вы также можете изменить дизайн, %{theme_link} или %{sidebar_link}"
change_your_blog_presentation: "изменив тему блога"
enable_plugins: "включив плагины"
help_explain: "Если вам нужна помощь, %{doc_link}."
read_our_documentation: "ознакомьтесь с документацией"
inbound:
inbound_links: "Inbound links"
you_have_no_internet_connection: "You have no internet connection"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/zh-CN.yml
Expand Up @@ -6,6 +6,16 @@ zh-CN:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "这里給你一個快速的概览,让你知道你的博客发生什么事情了。也许你想要%{available_actions}"
write_a_post: "写一篇文章"
write_a_page: "写一个页面"
update_your_profile_or_change_your_password: "更新资料或者修改密码"
customization_explain: "你也可以做一些设计, %{theme_link}或%{sidebar_link}."
change_your_blog_presentation: "修改你的博客外观"
enable_plugins: "启动插件"
help_explain: "如果需要帮助,%{doc_link}."
read_our_documentation: "阅读我们的文档"
inbound:
inbound_links: "导入链接"
you_have_no_internet_connection: "你没有连接到网络"
Expand Down
10 changes: 10 additions & 0 deletions config/locales/zh-TW.yml
Expand Up @@ -6,6 +6,16 @@ zh-TW:
last: "Last"
admin:
dashboard:
overview:
dashboard_explain: "這個地方給你一個快速的綜覽,讓你知道你的部落格發生甚麼事情了。也許你想要%{available_actions}"
write_a_post: "寫一篇文章"
write_a_page: "寫一個頁面"
update_your_profile_or_change_your_password: "更新資料或者修改密碼"
customization_explain: "你也可以作一些設計, %{theme_link}或%{sidebar_link}."
change_your_blog_presentation: "修改你的部落格外觀"
enable_plugins: "啟動plugins"
help_explain: "If you need help, %{doc_link}."
read_our_documentation: "Publify文件"
inbound:
inbound_links: "導入連結"
you_have_no_internet_connection: "你沒有連結到網路"
Expand Down

0 comments on commit 5a65699

Please sign in to comment.