diff --git a/assets/javascripts/templates/error_tmpl.coffee b/assets/javascripts/templates/error_tmpl.coffee
index 2b169c09..2292094c 100644
--- a/assets/javascripts/templates/error_tmpl.coffee
+++ b/assets/javascripts/templates/error_tmpl.coffee
@@ -1,74 +1,142 @@
error = (title, text = '', links = '') ->
- text = """
#{text}
""" if text
- links = """
#{links}
""" if links
- """
#{title}
#{text}#{links}
"""
+ text = """
#{_ text}
""" if text
+ links = """
#{_ links}
""" if links
+ """
#{_ title}
#{text}#{links}
"""
-back = 'Go back'
+back = -> "#{_ en: 'Go back', ja: '戻る'}"
app.templates.notFoundPage = ->
- error """ Page not found. """,
- """ It may be missing from the source documentation or this could be a bug. """,
- back
+ error(
+ en: """ Page not found. """
+ ja: """ ページが見つかりません。 """,
+ ,
+ en: """ It may be missing from the source documentation or this could be a bug. """
+ ja: """ ドキュメントソースを誤っているか、バグかもしれません。 """,
+ ,
+ back()
+ )
app.templates.pageLoadError = ->
- error """ The page failed to load. """,
- """ It may be missing from the server (try reloading the app) or you could be offline.
- If you keep seeing this, you're likely behind a proxy or firewall that blocks cross-domain requests. """,
- """ #{back} · Reload
- · Retry """
+ error(
+ en: """ The page failed to load. """
+ ja: """ ページの読み込みが失敗しました。 """
+ ,
+ en: """ It may be missing from the server (try reloading the app) or you could be offline.
+ If you keep seeing this, you're likely behind a proxy or firewall that blocks cross-domain requests. """
+ ja: """ サーバーを誤っています。(アプリを再度読み込んでください)または、オフラインです。
+ この表示が続くようであれば、プロキシの制限やファイヤーウォールでクロスドメインリクエストがブロックされています。 """
+ ,
+ """ #{back()}
+ ·
+
+ #{_ en: 'Reload', ja: '再読み込み'}
+
+ ·
+ Retry """
+ )
+
app.templates.bootError = ->
- error """ The app failed to load. """,
- """ Check your Internet connection and try reloading.
- If you keep seeing this, you're likely behind a proxy or firewall that blocks cross-domain requests. """
+ error(
+ en: """ The app failed to load. """
+ ja: """ アプリの読み込みに失敗しました。 """
+ ,
+ en: """ Check your Internet connection and try reloading.
+ If you keep seeing this, you're likely behind a proxy or firewall that blocks cross-domain requests. """
+ ja: """ インターネット接続を確認してください。再読み込みしてください。
+ この表示が続くようであれば、プロキシの制限やファイヤーウォールでクロスドメインリクエストがブロックされています。 """
+ )
app.templates.offlineError = (reason, exception) ->
if reason is 'cookie_blocked'
- return error """ Cookies must be enabled to use offline mode. """
+ return error(
+ en: """ Cookies must be enabled to use offline mode. """
+ ja: """ オフラインモードを使用してクッキーを有効にする必要があります。 """
+ )
reason = switch reason
when 'not_supported'
- """ DevDocs requires IndexedDB to cache documentations for offline access.
- Unfortunately your browser either doesn't support IndexedDB or doesn't make it available. """
+ en: """ DevDocs requires IndexedDB to cache documentations for offline access.
+ Unfortunately your browser either doesn't support IndexedDB or doesn't make it available. """
+ ja: """DevDocsはオフラインアクセスのために、IndexedDBにキャッシュすることを要求しています。
+ あいにく、お使いのブラウザはIndexedDBかキャッシュの作成いずれかが非対応です。"""
when 'buggy'
- """ DevDocs requires IndexedDB to cache documentations for offline access.
- Unfortunately your browser's implementation of IndexedDB contains bugs that prevent DevDocs from using it. """
+ en: """ DevDocs requires IndexedDB to cache documentations for offline access.
+ Unfortunately your browser's implementation of IndexedDB contains bugs that prevent DevDocs from using it. """
+ ja: """ DevDocsはオフラインアクセスのために、IndexedDBにキャッシュすることを要求しています。
+ あいにく、お使いのブラウザはIndexedDB containsの実行バグを防いでいます。"""
when 'private_mode'
- """ Your browser appears to be running in private mode.
- This prevents DevDocs from caching documentations for offline access."""
+ en: """ Your browser appears to be running in private mode.
+ This prevents DevDocs from caching documentations for offline access."""
+ ja: """ ブラウザのプライベートモードで表示しています。
+ オフラインアクセスによってドキュメントのキャッシュが防止されています。"""
when 'exception', 'cant_open'
- """ An error occurred when trying to open the IndexedDB database:
- #{exception.name}: #{exception.message}#{"""
- This could be because you're browsing in private mode or have disallowed offline storage on the domain.
- """ if reason is 'cant_open' else ''} """
+ en: """ An error occurred when trying to open the IndexedDB database:
+ #{exception.name}: #{exception.message}
+ #{if reason is 'cant_open' then """
+ This could be because you're browsing in private mode or have disallowed offline storage on the domain.
+ """ else ''} """
+ ja: """ IndexDBデータベースを開く際にエラーが起きています:
+ #{exception.name}: #{exception.message}
+ #{if reason is 'cant_open' then """
+ お使いのブラウザはプライベートモードかオフラインストレージを許可していないため、許可しましょう。
+ """ else ''} """
when 'version'
- """ The IndexedDB database was modified with a newer version of the app.
- Reload the page to use offline mode. """
+ en: """ The IndexedDB database was modified with a newer version of the app.
+ Reload the page to use offline mode. """
+ ja: """ IndexedDBデータベースはアプリの新しいバージョンに修正されています。
+ ページ再読み込み して、オフラインモードを使ってください。 """
+
when 'empty'
- """ The IndexedDB database appears to be corrupted. Try resetting the app. """
+ en: """ The IndexedDB database appears to be corrupted. Try resetting the app. """
+ ja: """IndexedDBデータベースに誤りがあります。 アプリをリセットしてみてください。 """
error 'Offline mode is unavailable.', reason
-app.templates.unsupportedBrowser = """
-
-
Your browser is unsupported, sorry.
-
DevDocs is an API documentation browser which supports the following browsers:
-
-
Recent versions of Chrome and Firefox
-
Safari 5.1+
-
Opera 12.1+
-
Internet Explorer 10+
-
iOS 6+
-
Android 4.1+
-
Windows Phone 8+
-
-
- If you're unable to upgrade, I apologize.
- I decided to prioritize speed and new features over support for older browsers.
-
- Note: if you're already using one of the browsers above, check your settings and add-ons.
- The app uses feature detection, not user agent sniffing.
-
DevDocs is an API documentation browser which supports the following browsers:
+
+
Recent versions of Chrome and Firefox
+
Safari 5.1+
+
Opera 12.1+
+
Internet Explorer 10+
+
iOS 6+
+
Android 4.1+
+
Windows Phone 8+
+
+
+ If you're unable to upgrade, I apologize.
+ I decided to prioritize speed and new features over support for older browsers.
+
+ Note: if you're already using one of the browsers above, check your settings and add-ons.
+ The app uses feature detection, not user agent sniffing.
+