diff --git a/app/js/common/version.js b/app/js/common/version.js index e56eec40..963bdb53 100644 --- a/app/js/common/version.js +++ b/app/js/common/version.js @@ -45,7 +45,7 @@ function verck(ver,winstore) { var newest=mess.desk; } if (newest == ver) { - todo(lang_version_usever[lang].replace("{{ver}}" ,mess.desk)); + todo(lang.lang_version_usever.replace("{{ver}}" ,mess.desk)); //betaかWInstoreならアプデチェックしない } else if (ver.indexOf("beta")!=-1 || winstore) { @@ -56,7 +56,7 @@ function verck(ver,winstore) { var ipc = electron.ipcRenderer; ipc.send('update', "true"); }else{ - todo(lang_version_skipver[lang]); + todo(lang.lang_version_skipver); } }else{ var ipc = electron.ipcRenderer; diff --git a/app/js/lang/lang.en.js b/app/js/lang/lang.en.js new file mode 100644 index 00000000..0a17a4ce --- /dev/null +++ b/app/js/lang/lang.en.js @@ -0,0 +1,225 @@ +//commonError +var lang={ + "language":"en", + "lang_toot":"Toot", + "lang_there":"Yes", + "lang_nothing":"None", + "lang_yesno":"Yes", + "lang_no":"No", + "lang_progress":"Wait...", + "lang_edit":"Edit", + "lang_del":"Delete", + "lang_add":"Add", + "lang_fatalerroroccured":"Some errors are occured, please restart TheDesk.", + "lang_speech":"Google US English", + //language.html + "lang_lang":"Language", + "lang_langlocale":"English", + "lang_back":"Back", + "lang_set":"Set", + "lang_langadd":"Translate TheDesk to other languages or proofread TheDesk on GitHub. TheDesk needs your help.", + //common/version.js + "lang_version_usever":"No update is found({{ver}})", + "lang_version_skipver":"Update was ignored.", + //login + //login/login.js + "lang_login_noauth":"Show TL of unlogined accounts", + //login/manager.js + "lang_manager_info":"About this instance", + "lang_manager_refresh":"Refresh", + "lang_manager_delete":"Logout", + "lang_manager_color":"Account Color", + "lang_manager_confirm":"is about to logout. Continue?", + "lang_manager_mainAcct":"Done:choose main account", + "lang_manager_def":"Default", + "lang_manager_none":"None", + "lang_manager_godev":"Open DevCenter of Misskey. We show also an official documents to refer.", + //post/bb-md.js + "lang_bbmd_misskey":"TheDesk regards \"@\" as reply, but put other parameter. Unlisted on Mastodon means Home on Misskey.", + //post/emoji.js + "lang_emoji_get":"Get emojis", + "lang_emoji_custom":"Custom emojis", + //post/img.js + "lang_postimg_previewdis":"cannot preview", + "lang_postimg_aftupload":"You cannot change accounts after uploading.", + //post/post.js + "lang_post_tagTL":"This toot does not contain a default tag. This toot will not be shown on Local TL. Continue?", + "lang_post_tagVis":"This toot(not 'public' toot) is not shown on this tag's TL.", + "lang_post_cwtitle":"Auto CW Alert", + "lang_post_cwtxt":"You are about to post longer toot than you set.\nWarning text:", + "lang_post_btn1":"Cancel (will not post)", + "lang_post_btn2":"Make text hidden automatically", + "lang_post_btn3":"Continue to post", + //post/status.js + "lang_status_favWarn":"It will take a miunte to favourite a remote toot.", + "lang_status_btWarn":"It will take a miunte to boost a remote toot.", + "lang_status_follow":"Follow", + "lang_status_unfollow":"Unfollow", + "lang_status_block":"Block", + "lang_status_unblock":"Unblock", + "lang_status_mute":"Mute", + "lang_status_unmute":"Unmute", + "lang_status_redraft":"Continue to delete & redraft? You lose statuses of this toot. This fanction may contain some bugs. Images of this toot will be deleted on older than Mastodon 2.4.1.", + "lang_status_emphas":"'s toots are emphasized. Please reload after this action.", + "lang_status_unemphas":"'s toots are not emphasized. Please reload after this action.", + "lang_status_unendorse":"Not feature on profile", + "lang_status_endorse":"Feature on profile", + //post/suggest.js + "lang_suggest_nodata":"Please get emojis list in order to show suggestion.", + //post/use-txtbox.js + "lang_usetxtbox_reply":"Reply Mode. Ctrl+Shift+C to clear.", + //tl/card.js + "lang_cards_check":" check", + "lang_cards_pip":"PiP mode", + //tl/details.js + "lang_details_nodata":"No data", + "lang_details_filtered":"Filtered toot", + "lang_details_embed":"Embed HTML is cliped.", + "lang_details_url":"URL of this toot is cliped.", + "lang_details_txt":"Content of this toot is cliped.", + //tl/filter.js + "lang_filter_nodata":"No data", + "lang_filter_errordegree":"Please check a context", + //tl/list.js + "lang_list_nodata":"No data", + "lang_list_show":"Show", + "lang_list_users":"Users list", + "lang_list_nouser":"No users in this list.", + "lang_list_add":"Add to the list", + "lang_list_remove":"Remove from the list", + //tl/notification.js + "lang_notf_new":" new notifications", + //tl/speech.js + "lang_speech_refresh":"Save valie about TTS config", + //tl/src.js + "lang_src_ts":"chronological order", + "lang_src_people":" people toot", + //tl/tag.js + "lang_tags_always":"Always toots with ", + "lang_tags_realtime":"Tag-stream toot", + "lang_tags_tagunpin":"Unpin {{tag}}", + "lang_tags_tagwarn":"When you toot without {{tag}}, tag-streaming mode will be off.", + //tl/tl.js + "lang_tl_media":"Media", + "lang_tl_reconnect":"Reconnect to streaming API", + //ui/layout.js + "lang_layout_gotop":"Go top of this column. When icon is red, this column cannot connect straming API. Please reload.", + "lang_layout_thisacct":"{{notf}} of this account", + "lang_layout_delthis":"Remove this column", + "lang_layout_setthis":"Preferences of this column", + "lang_layout_mediafil":"Media filtering", + "lang_layout_linkana":"Auto Link Analyzer", + "lang_layout_linkanades":"Auto link analyzer", + "lang_layout_tts":"Text to speech ", + "lang_layout_reconnect":"Reconnect to streaming API", + "lang_layout_headercolor":"Header color of this column", + "lang_layout_nodata":"[No data]
F5/⌘+R to reload", + "lang_layout_dm":"Direct Message", + "lang_layout_webviewmode":"Prefer WebView", + //ui/spotify.js + "lang_spotify_img":"Attach an album artwork", + "lang_spotify_imgno":"Not attach an album artwork", + "lang_spotify_acct":"Connect TheDesk to Spotify", + "lang_spotify_np":"Done:templete of NowPlaying", + //userdata/his-data.js + "lang_hisdata_frcreq":"Required Mastodon 2.4.3 and above", + "lang_hisdata_frcwarn":"Unfollow accounts will be shown.", + "lang_hisdata_taketime":"It will take 30s ~ several minutes", + "lang_hisdata_notonmisskey":"Misskey is unable to request.", + //userdata/showOnTL.js + "lang_showontl_movetxt":"This account was moved", + "lang_showontl_movebtn":"Continue on the new account", + "lang_showontl_botacct":"[bot]", + "lang_showontl_followed":"Following you", + "lang_showontl_notf":"Notification ", + "lang_showontl_domain":"Domain ", + "lang_showontl_listwarn":"Follow to add this user to lists.", +//parse + "lang_parse_mentioned":" replied to you", + "lang_parse_faved":" favourited your toot", + "lang_parse_bted":" boosted your toot", + "lang_parse_btedsimple":" boosted", + "lang_parse_notftime":"Actioned at", + "lang_parse_cwshow":"Show", + "lang_parse_fulltext":"Full size text:", + "lang_parse_autofold":"Auto folded", + "lang_parse_more":"More", + "lang_parse_url":"URL Analyzer", + "lang_parse_tagTL":"Timeline of {{tag}}", + "lang_parse_tagtoot":"Toot with {{tag}}", + "lang_parse_tagpin":"Pin {{tag}}", + "lang_parse_public":"Public", + "lang_parse_unlisted":"Unlisted", + "lang_parse_private":"Private", + "lang_parse_direct":"Direct", + "lang_parse_clickcopy":"Click to copy text of this toot", + "lang_parse_clickcopyurl":"Click to copy URL of this toot", + "lang_parse_trans":"Translate to Japanese", + "lang_parse_replyto":"Reply to this toot", + "lang_parse_bt":"Boost this toot", + "lang_parse_fav":"Favourite this toot", + "lang_parse_quote":"Quote this toot", + "lang_parse_del":"Delete this toot", + "lang_parse_pin":"Pin this toot", + "lang_parse_det":"Details via your main account.", + "lang_parse_redraft":"Delete & re-draft", + "lang_parse_followed":"Followed you", + "lang_parse_clientop":"Operation of this client", + "lang_parse_clienttxt":" will be", + "lang_parse_clientno":"done nothing", + "lang_parse_clientemp":"emphasized(/not emphasized)", + "lang_parse_clientmute":"muted", + "lang_parse_mute":" will be muted. You can remove on preferences.", + //misskey + "lang_misskeyparse_renote":"Repost", + "lang_misskeyparse_renoteqt":"Renote", + "lang_misskeyparse_reaction":"Reaction", + "lang_misskeyparse_tagnostr":"No streaming API on Tag TLs", + "lang_misskeyparse_listnostr":"No streaming API on List TLs", + "lang_misskeyparse_home":"Home", + "lang_misskeyparse_followers":"Follower", + "lang_misskeyparse_specified":"Specified User", + "lang_misskeyparse_qt":"Misskey renote(quote) mode:Ctrl+Shift+Enter to clear", + "lang_misskeyparse_renoted":" renoted your following post.", + "lang_misskeyparse_quoted":" quoted your following post.", + "lang_misskeyparse_reacted":" reacted your following post.", +//setting + "lang_setting_time":"Time format:{{set}}", + "lang_setting_theme":"Theme:{{set}}", + "lang_setting_nsfw":"NSFW:{{set}}", + "lang_setting_cw":"CW:{{set}}", + "lang_setting_cwtext":"Default CW text:{{set}}", + "lang_setting_cws":"Always CW on:{{set}}", + "lang_setting_rp":"Reply counter:{{set}}", + "lang_setting_vis":"Default visibility:{{set}}", + "lang_setting_popup":"Popup notification:{{set}}", + "lang_setting_off":"Off", + "lang_setting_s":"s", + "lang_setting_box":"Default toot box action:{{set}}", + "lang_setting_gif":"GIF:{{set}}", + "lang_setting_selt":"Auto fold:{{set1}} lines and above, {{set2}} letters and above", + "lang_setting_autocw":"Auto CW:{{set1}} lines and above, {{set2}} letters and above", + "lang_setting_width":"Minimam width:{{set}}", + "lang_setting_img":"After posting an image:{{set}}", + "lang_setting_font":"Fonts:{{set}}", + "lang_setting_default":"default font", + "lang_setting_size":"Font size:{{set}}px", + "lang_setting_imgheight":"Image height:{{set}}px", + "lang_setting_ticker":"#InstanceTicker:{{set}}px", + "lang_setting_tag":"Tag TL:{{set}}", + "lang_setting_boxConfirm":"Post box:{{set}}", + "lang_setting_ul":"Native locale:{{set}}", + "lang_setting_notf":"Native notification:{{set}}", + "lang_setting_quote":"Quote format:{{set}}", + "lang_setting_via":"Via:{{set}}", + "lang_setting_mov":"Action buttons hiding:{{set}}", + "lang_setting_setasread":"Notification markers:{{set}}", + "lang_setting_main":"Default account:{{set}}", + "lang_setting_sec":"Secondary toot button:{{set}}", + "lang_setting_ksref":"Keyboard shortcuts are refreshed.", + "lang_setting_nomuting":"No client is muted.", + "lang_setting_notftest":" Notification test ", + "lang_setting_notftestprof":"Your icon is shown.", + "lang_setting_exportwarn":"Only important data will be exported. You must keep this data secure.", + "lang_setting_importwarn":"All data will be deleted.", +} \ No newline at end of file diff --git a/app/js/lang/lang.ja.js b/app/js/lang/lang.ja.js new file mode 100644 index 00000000..cf24c38b --- /dev/null +++ b/app/js/lang/lang.ja.js @@ -0,0 +1,226 @@ + //commonError +var lang={ + "language":"ja", + //commonError + "lang_toot":"トゥート", + "lang_there":"あり", + "lang_nothing":"なし", + "lang_yesno":"はい", + "lang_no":"いいえ", + "lang_progress":"処理中", + "lang_edit":"編集", + "lang_del":"削除", + "lang_add":"追加", + "lang_fatalerroroccured":"エラーが発生しました。しばらく待ってから再起動してください。", + "lang_speech":"Google 日本語", +//language.html + "lang_lang":"言語", + "lang_langlocale":"日本語", + "lang_back":"戻る", + "lang_set":"設定", + "lang_langadd":"GitHubから翻訳に参加できます。英語の校正(緊急)や他言語に翻訳していただける方を募集しております。", +//common/version.js + "lang_version_usever":"お使いのバージョン{{ver}}は最新です。", + "lang_version_skipver":"アップデートはスキップされました。", +//login +//login/login.js + "lang_login_noauth":"認証せずに見る", +//login/manager.js + "lang_manager_info":"インスタンス情報", + "lang_manager_refresh":"情報更新", + "lang_manager_delete":"削除", + "lang_manager_color":"アカウントカラーを選択", + "lang_manager_confirm":"を削除します。", + "lang_manager_mainAcct":"メインアカウントを設定しました。", + "lang_manager_def":"既定", + "lang_manager_none":"なし", + "lang_manager_godev":"MisskeyのDevセンターに移動します。同時に開かれるドキュメントを参考にログインしてください。", +//post/bb-md.js + "lang_bbmd_misskey":"TheDeskにおけるMisskeyでは、@を返信として扱いますが、全ての@は消去され別パラメータに入力されます。また、「未収載」を「ホーム」として扱います。", +//post/emoji.js + "lang_emoji_get":"絵文字リストを取得", + "lang_emoji_custom":"カスタム絵文字", +//post/img.js + "lang_postimg_previewdis":"プレビューできません。", + "lang_postimg_aftupload":"アップロード後はアカウントを切り替えられません。", +//post/post.js + "lang_post_tagTL":"デフォルトタグが挿入されていません。このまま投稿するとローカルには表示されません。", + "lang_post_tagVis":"公開範囲が「公開」以外だと、タグTLに表示されません。(一部インスタンスを除く)", + "lang_post_cwtitle":"長文投稿の警告", + "lang_post_cwtxt":"指定文字数、行数を超えるトゥートを行おうとしています。\n自動CWのタイトル:", + "lang_post_btn1":"キャンセル(投稿しない)", + "lang_post_btn2":"自動でCWを付ける", + "lang_post_btn3":"そのまま投稿", +//post/status.js + "lang_status_favWarn":"お気に入り登録しました。インスタンスが違うときは時間がかかる場合があります。", + "lang_status_btWarn":"ブーストしました。インスタンスが違うときは時間がかかる場合があります。", + "lang_status_follow":"フォロー", + "lang_status_unfollow":"フォロー解除", + "lang_status_block":"ブロック", + "lang_status_unblock":"ブロック解除", + "lang_status_mute":"ミュート", + "lang_status_unmute":"ミュート解除", + "lang_status_redraft":"削除して再編集しますか?そのトゥートの全てのデータがリセットされます。この機能はベータ版です。画像は~v2.4.1で破棄されます。", + "lang_status_emphas":"を強調します。リロードしてください。", + "lang_status_unemphas":"を強調解除します。リロードしてください。", + "lang_status_unendorse":"紹介解除", + "lang_status_endorse":"プロフで紹介する", +//post/suggest.js + "lang_suggest_nodata":"サジェストのために絵文字リストを取得してください。", +//post/use-txtbox.js + "lang_usetxtbox_reply":"返信モードです。クリアするときはCtrl+Shift+Cを押してください。", +//tl/card.js + "lang_cards_check":"チェック", + "lang_cards_pip":"ながら観モード", +//tl/details.js + "lang_details_nodata":"データなし", + "lang_details_filtered":"フィルターされました。", + "lang_details_embed":"埋め込みHTMLがコピーされました。", + "lang_details_url":"トゥートURLがコピーされました。", + "lang_details_txt":"トゥート本文がコピーされました。", +//tl/filter.js + "lang_filter_nodata":"フィルターはありません", + "lang_filter_errordegree":"適応範囲を最低一つ以上チェックしてください。", +//tl/list.js + "lang_list_nodata":"リストはありません", + "lang_list_show":"表示", + "lang_list_users":"ユーザー一覧", + "lang_list_nouser":"ユーザーはいません", + "lang_list_add":"リストに追加", + "lang_list_remove":"リストから削除", +//tl/notification.js + "lang_notf_new":"件の新しい通知", +//tl/speech.js + "lang_speech_refresh":"音声読み上げ設定を更新しました。", +//tl/src.js + "lang_src_ts":"時系列", + "lang_src_people":"人がトゥート", +//tl/tag.js + "lang_tags_always":"常に", + "lang_tags_realtime":"実況", + "lang_tags_tagunpin":"{{tag}}をよく使うタグから削除", + "lang_tags_tagwarn":"次に{{tag}}なしでトゥートするまで全てのトゥートに{{tag}}が付与されます。", +//tl/tl.js + "lang_tl_media":"メディア", + "lang_tl_reconnect":"Streamingに再接続しました", +//ui/layout.js + "lang_layout_gotop":"一番上へ。アイコンが赤のときはストリーミングに接続できていません。F5等で再読込をお試し下さい。", + "lang_layout_thisacct":"このアカウントの{{notf}}", + "lang_layout_delthis":"このカラムを削除", + "lang_layout_setthis":"このカラムの設定", + "lang_layout_mediafil":"メディアフィルター", + "lang_layout_linkana":"リンク解析", + "lang_layout_linkanades":"リンクの解析を切り替え", + "lang_layout_tts":"読み上げ", + "lang_layout_reconnect":"ストリーミング再接続", + "lang_layout_headercolor":"TLヘッダーカラー", + "lang_layout_nodata":"[ここにトゥートはありません。]
F5/⌘+Rで再読込できます。", + "lang_layout_dm":"ダイレクトメッセージ", + "lang_layout_webviewmode":"WebView優先", +//ui/spotify.js + "lang_spotify_img":"アルバムアートワークを添付します。", + "lang_spotify_imgno":"アルバムアートワークを添付しません。", + "lang_spotify_acct":"アカウント連携をしてください。", + "lang_spotify_np":"NowPlaying文書を更新しました。", +//userdata/his-data.js + "lang_hisdata_frcreq":"Mastodon 2.4.3~が必要です", + "lang_hisdata_frcwarn":"非フォローだけど絡みがある時に表示されます。", + "lang_hisdata_taketime":"30秒から数分かかります", + "lang_hisdata_notonmisskey":"このシステムはMisskeyにはありません。", +//userdata/showOnTL.js + "lang_showontl_movetxt":"このアカウントは移行しています", + "lang_showontl_movebtn":"移行先を見る", + "lang_showontl_botacct":"botアカウント", + "lang_showontl_followed":"フォローされています", + "lang_showontl_notf":"通知", + "lang_showontl_domain":"ドメイン", + "lang_showontl_listwarn":"リストに追加するためにはフォローが必要です。", +//parse + "lang_parse_mentioned":"が返信しました", + "lang_parse_faved":"がお気に入り登録しました", + "lang_parse_bted":"がブーストしました", + "lang_parse_btedsimple":"がブースト", + "lang_parse_notftime":"通知された時間", + "lang_parse_cwshow":"見る", + "lang_parse_fulltext":"以下全文", + "lang_parse_autofold":"自動折り畳み", + "lang_parse_more":"続き...", + "lang_parse_url":"URL解析", + "lang_parse_tagTL":"{{tag}}のタイムライン", + "lang_parse_tagtoot":"{{tag}}でトゥート", + "lang_parse_tagpin":"{{tag}}をよく使うタグへ", + "lang_parse_public":"公開", + "lang_parse_unlisted":"未収載", + "lang_parse_private":"非公開", + "lang_parse_direct":"ダイレクト", + "lang_parse_clickcopy":"クリックして本文をコピー", + "lang_parse_clickcopyurl":"クリックしてトゥートURLをコピー", + "lang_parse_trans":"このトゥートを日本語に翻訳", + "lang_parse_replyto":"このトゥートに返信", + "lang_parse_bt":"このトゥートをブースト", + "lang_parse_fav":"このトゥートをお気に入り登録", + "lang_parse_quote":"このトゥートを引用", + "lang_parse_del":"このトゥートを削除", + "lang_parse_pin":"このトゥートをピン留め", + "lang_parse_det":"詳細(メインアカウント経由)", + "lang_parse_redraft":"このトゥートを削除して再編集", + "lang_parse_followed":"フォローされました。", + "lang_parse_clientop":"クライアント処理", + "lang_parse_clienttxt":"に対する処理を選択してください。", + "lang_parse_clientno":"何もしない", + "lang_parse_clientemp":"強調表示/解除", + "lang_parse_clientmute":"ミュート", + "lang_parse_mute":"ミュートします。設定から解除できます。", + //misskey + "lang_misskeyparse_renote":"再投稿", + "lang_misskeyparse_renoteqt":"引用", + "lang_misskeyparse_reaction":"リアクション", + "lang_misskeyparse_tagnostr":"タグTLはストリーミング非対応です。", + "lang_misskeyparse_listnostr":"リストTLはストリーミング非対応です。", + "lang_misskeyparse_home":"ホーム", + "lang_misskeyparse_followers":"フォロワー", + "lang_misskeyparse_specified":"ユーザー指定", + "lang_misskeyparse_qt":"MisskeyのRenote(引用モード)中:Ctrl+Shift+Cでクリア", + "lang_misskeyparse_renoted":"がRepost", + "lang_misskeyparse_quoted":"が引用", + "lang_misskeyparse_reacted":"がリアクション", +//setting + "lang_setting_time":"時間設定を{{set}}に設定しました。", + "lang_setting_theme":"テーマ設定を{{set}}に設定しました。", + "lang_setting_nsfw":"画像表示設定を{{set}}に設定しました。", + "lang_setting_cw":"テキスト表示設定を{{set}}に設定しました。", + "lang_setting_cwtext":"デフォルトの警告文を「{{set}}」に設定しました。", + "lang_setting_cws":"標準でCW:{{set}}", + "lang_setting_rp":"リプライ数表示:{{set}}", + "lang_setting_vis":"デフォルトの公開設定を{{set}}に設定しました。", + "lang_setting_popup":"ポップアップお知らせを{{set}}に設定しました。", + "lang_setting_off":"オフ", + "lang_setting_s":"秒", + "lang_setting_box":"デフォルトでのボックスの挙動を{{set}}に設定しました。", + "lang_setting_gif":"アイコンアニメーション再生を{{set}}に設定しました。", + "lang_setting_selt":"{{set1}}行以上または{{set2}}文字以上でテキストを隠します。", + "lang_setting_autocw":"{{set1}}行以上または{{set2}}文字以上で警告を表示します。", + "lang_setting_width":"横幅最低を{{set}}pxに設定しました。", + "lang_setting_img":"画像投稿後の設定を「{{set}}」に設定しました。", + "lang_setting_font":"フォントを{{set}}に設定しました。", + "lang_setting_default":"デフォルト", + "lang_setting_size":"フォントサイズを{{set}}pxに設定しました。", + "lang_setting_imgheight":"画像高さを{{set}}pxに設定しました。", + "lang_setting_ticker":"#InstanceTicker使用を{{set}}に設定しました。", + "lang_setting_tag":"タグの取得範囲を「{{set}}」に設定しました。", + "lang_setting_boxConfirm":"投稿ボックスを{{set}}", + "lang_setting_ul":"独自ロケール設定を{{set}}に設定しました。", + "lang_setting_notf":"ネイティブ通知を{{set}}に設定しました。", + "lang_setting_quote":"引用形式を{{set}}に設定しました。", + "lang_setting_via":"via表示を{{set}}に設定しました。", + "lang_setting_mov":"アクションボタン非表示を{{set}}に設定しました。", + "lang_setting_setasread":"通知カラム存在時新着非表示を{{set}}に設定しました。", + "lang_setting_main":"起動時・投稿時のアカウントを{{set}}に設定しました。", + "lang_setting_sec":"セカンダリートゥートボタン:{{set}}", + "lang_setting_ksref":"キーボードショートカットが更新されました。", + "lang_setting_nomuting":"ミュートしているクライアントはありません。", + "lang_setting_notftest":"通知テスト", + "lang_setting_notftestprof":"アイコンはあなたのアカウントのものです。", + "lang_setting_exportwarn":"重要なデータのみエクスポートされます。エクスポートされたデータは外部に公開しないでください。全ての認証データが含まれています。", + "lang_setting_importwarn":"全てのデータがリセットされます。" +} \ No newline at end of file diff --git a/app/js/lang/lang.js b/app/js/lang/lang.js index 824a1a23..e69de29b 100644 --- a/app/js/lang/lang.js +++ b/app/js/lang/lang.js @@ -1,458 +0,0 @@ -//commonError -var lang_toot={ - "ja":"トゥート", - "en":"Toot" -} -var lang_there={ - "ja":"あり", - "en":"Yes" -} -var lang_nothing={ - "ja":"なし", - "en":"None" -} -var lang_yesno={ - "ja":"はい", - "en":"Yes" -} -var lang_no={ - "ja":"いいえ", - "en":"No" -} -var lang_progress={ - "ja":"処理中", - "en":"Wait..." -} -var lang_edit={ - "ja":"編集", - "en":"Edit" -} -var lang_del={ - "ja":"削除", - "en":"Delete" -} -var lang_add={ - "ja":"追加", - "en":"Add" -} -var lang_fatalerroroccured={ - "ja":"エラーが発生しました。しばらく待ってから再起動してください。", - "en":"Some errors are occured, please restart TheDesk." -} -var lang_speech={ - "ja":"Google 日本語", - "en":"Google US English" -} -//language.html -var lang_lang={ - "ja":"言語", - "en":"Language" -} -var lang_langlocale={ - "ja":"日本語", - "en":"English" -} -var lang_back={ - "ja":"戻る", - "en":"Back" -} -var lang_set={ - "ja":"設定", - "en":"Set" -} -var lang_langadd={ - "ja":"GitHubから翻訳に参加できます。英語の校正(緊急)や他言語に翻訳していただける方を募集しております。", - "en":"Translate TheDesk to other languages or proofread TheDesk on GitHub. TheDesk needs your help." -} -//common/version.js -var lang_version_usever={ - "ja":"お使いのバージョン{{ver}}は最新です。", - "en":"No update is found({{ver}})" -} -var lang_version_skipver={ - "ja":"アップデートはスキップされました。", - "en":"Update was ignored." -} -//login -//login/login.js -var lang_login_noauth={ - "ja":"認証せずに見る", - "en":"Show TL of unlogined accounts" -} -//login/manager.js -var lang_manager_info={ - "ja":"インスタンス情報", - "en":"About this instance" -} -var lang_manager_refresh={ - "ja":"情報更新", - "en":"Refresh" -} -var lang_manager_delete={ - "ja":"削除", - "en":"Logout" -} -var lang_manager_color={ - "ja":"アカウントカラーを選択", - "en":"Account Color" -} -var lang_manager_confirm={ - "ja":"を削除します。", - "en":"is about to logout. Continue?" -} -var lang_manager_mainAcct={ - "ja":"メインアカウントを設定しました。", - "en":"Done:choose main account" -} -var lang_manager_def={ - "ja":"既定", - "en":"Default" -} -var lang_manager_none={ - "ja":"なし", - "en":"None" -} -var lang_manager_godev={ - "ja":"MisskeyのDevセンターに移動します。同時に開かれるドキュメントを参考にログインしてください。", - "en":"Open DevCenter of Misskey. We show also an official documents to refer." -} -//post/bb-md.js -var lang_bbmd_misskey={ - "ja":"TheDeskにおけるMisskeyでは、@を返信として扱いますが、全ての@は消去され別パラメータに入力されます。また、「未収載」を「ホーム」として扱います。", - "en":"TheDesk regards \"@\" as reply, but put other parameter. Unlisted on Mastodon means Home on Misskey." -} -//post/emoji.js -var lang_emoji_get={ - "ja":"絵文字リストを取得", - "en":"Get emojis" -} -var lang_emoji_custom={ - "ja":"カスタム絵文字", - "en":"Custom emojis" -} -//post/img.js -var lang_postimg_previewdis={ - "ja":"プレビューできません。", - "en":"cannot preview" -} -var lang_postimg_aftupload={ - "ja":"アップロード後はアカウントを切り替えられません。", - "en":"You cannot change accounts after uploading." -} -//post/post.js -var lang_post_tagTL={ - "ja":"デフォルトタグが挿入されていません。このまま投稿するとローカルには表示されません。", - "en":"This toot does not contain a default tag. This toot will not be shown on Local TL. Continue?" -} -var lang_post_tagVis={ - "ja":"公開範囲が「公開」以外だと、タグTLに表示されません。(一部インスタンスを除く)", - "en":"This toot(not 'public' toot) is not shown on this tag's TL." -} -var lang_post_cwtitle={ - "ja":"長文投稿の警告", - "en":"Auto CW Alert" -} -var lang_post_cwtxt={ - "ja":"指定文字数、行数を超えるトゥートを行おうとしています。\n自動CWのタイトル:", - "en":"You are about to post longer toot than you set.\nWarning text:" -} -var lang_post_btn1={ - "ja":"キャンセル(投稿しない)", - "en":"Cancel (will not post)" -} -var lang_post_btn2={ - "ja":"自動でCWを付ける", - "en":"Make text hidden automatically" -} -var lang_post_btn3={ - "ja":"そのまま投稿", - "en":"Continue to post" -} -//post/status.js -var lang_status_favWarn={ - "ja":"お気に入り登録しました。インスタンスが違うときは時間がかかる場合があります。", - "en":"It will take a miunte to favourite a remote toot." -} -var lang_status_btWarn={ - "ja":"ブーストしました。インスタンスが違うときは時間がかかる場合があります。", - "en":"It will take a miunte to boost a remote toot." -} -var lang_status_follow={ - "ja":"フォロー", - "en":"Follow" -} -var lang_status_unfollow={ - "ja":"フォロー解除", - "en":"Unfollow" -} -var lang_status_block={ - "ja":"ブロック", - "en":"Block" -} -var lang_status_unblock={ - "ja":"ブロック解除", - "en":"Unblock" -} -var lang_status_mute={ - "ja":"ミュート", - "en":"Mute" -} -var lang_status_unmute={ - "ja":"ミュート解除", - "en":"Unmute" -} -var lang_status_redraft={ - "ja":"削除して再編集しますか?そのトゥートの全てのデータがリセットされます。この機能はベータ版です。画像は~v2.4.1で破棄されます。", - "en":"Continue to delete & redraft? You lose statuses of this toot. This fanction may contain some bugs. Images of this toot will be deleted on older than Mastodon 2.4.1." -} -var lang_status_emphas={ - "ja":"を強調します。リロードしてください。", - "en":"'s toots are emphasized. Please reload after this action." -} -var lang_status_unemphas={ - "ja":"を強調解除します。リロードしてください。", - "en":"'s toots are not emphasized. Please reload after this action." -} -var lang_status_unendorse={ - "ja":"紹介解除", - "en":"Not feature on profile" -} -var lang_status_endorse={ - "ja":"プロフで紹介する", - "en":"Feature on profile" -} -//post/suggest.js -var lang_suggest_nodata={ - "ja":"サジェストのために絵文字リストを取得してください。", - "en":"Please get emojis list in order to show suggestion." -} -//post/use-txtbox.js -var lang_usetxtbox_reply={ - "ja":"返信モードです。クリアするときはCtrl+Shift+Cを押してください。", - "en":"Reply Mode. Ctrl+Shift+C to clear." -} -//tl/card.js -var lang_cards_check={ - "ja":"チェック", - "en":" check" -} -var lang_cards_pip={ - "ja":"ながら観モード", - "en":"PiP mode" -} -//tl/details.js -var lang_details_nodata={ - "ja":"データなし", - "en":"No data" -} -var lang_details_filtered={ - "ja":"フィルターされました。", - "en":"Filtered toot" -} -var lang_details_embed={ - "ja":"埋め込みHTMLがコピーされました。", - "en":"Embed HTML is cliped." -} -var lang_details_url={ - "ja":"トゥートURLがコピーされました。", - "en":"URL of this toot is cliped." -} -var lang_details_txt={ - "ja":"トゥート本文がコピーされました。", - "en":"Content of this toot is cliped." -} -//tl/filter.js -var lang_filter_nodata={ - "ja":"フィルターはありません", - "en":"No data" -} -var lang_filter_errordegree={ - "ja":"適応範囲を最低一つ以上チェックしてください。", - "en":"Please check a context" -} -//tl/list.js -var lang_list_nodata={ - "ja":"リストはありません", - "en":"No data" -} -var lang_list_show={ - "ja":"表示", - "en":"Show" -} -var lang_list_users={ - "ja":"ユーザー一覧", - "en":"Users list" -} -var lang_list_nouser={ - "ja":"ユーザーはいません", - "en":"No users in this list." -} -var lang_list_add={ - "ja":"リストに追加", - "en":"Add to the list" -} -var lang_list_remove={ - "ja":"リストから削除", - "en":"Remove from the list" -} -//tl/notification.js -var lang_notf_new={ - "ja":"件の新しい通知", - "en":" new notifications" -} -//tl/speech.js -var lang_speech_refresh={ - "ja":"音声読み上げ設定を更新しました。", - "en":"Save valie about TTS config" -} -//tl/src.js -var lang_src_ts={ - "ja":"時系列", - "en":"chronological order" -} -var lang_src_people={ - "ja":"人がトゥート", - "en":" people toot" -} -//tl/tag.js -var lang_tags_always={ - "ja":"常に", - "en":"Always toots with " -} -var lang_tags_realtime={ - "ja":"実況", - "en":"Tag-stream toot" -} -var lang_tags_tagunpin={ - "ja":"{{tag}}をよく使うタグから削除", - "en":"Unpin {{tag}}" -} -var lang_tags_tagwarn={ - "ja":"次に{{tag}}なしでトゥートするまで全てのトゥートに{{tag}}が付与されます。", - "en":"When you toot without {{tag}}, tag-streaming mode will be off." -} -//tl/tl.js -var lang_tl_media={ - "ja":"メディア", - "en":"Media" -} -var lang_tl_reconnect={ - "ja":"Streamingに再接続しました", - "en":"Reconnect to streaming API" -} -//ui/layout.js -var lang_layout_gotop={ - "ja":"一番上へ。アイコンが赤のときはストリーミングに接続できていません。F5等で再読込をお試し下さい。", - "en":"Go top of this column. When icon is red, this column cannot connect straming API. Please reload." -} -var lang_layout_thisacct={ - "ja":"このアカウントの{{notf}}", - "en":"{{notf}} of this account" -} -var lang_layout_delthis={ - "ja":"このカラムを削除", - "en":"Remove this column" -} -var lang_layout_setthis={ - "ja":"このカラムの設定", - "en":"Preferences of this column" -} -var lang_layout_mediafil={ - "ja":"メディアフィルター", - "en":"Media filtering" -} -var lang_layout_linkana={ - "ja":"リンク解析", - "en":"Auto Link Analyzer" -} -var lang_layout_linkanades={ - "ja":"リンクの解析を切り替え(OFFで制限を回避出来る場合があります)", - "en":"Auto link analyzer(You may got limitation of API)" -} -var lang_layout_tts={ - "ja":"読み上げ", - "en":"Text to speech " -} -var lang_layout_reconnect={ - "ja":"ストリーミング再接続", - "en":"Reconnect to streaming API" -} -var lang_layout_headercolor={ - "ja":"TLヘッダーカラー", - "en":"Header color of this column" -} -var lang_layout_nodata={ - "ja":"[ここにトゥートはありません。]
F5/⌘+Rで再読込できます。", - "en":"[No data]
F5/⌘+R to reload" -} -var lang_layout_dm={ - "ja":"ダイレクトメッセージ", - "en":"Direct Message" -} -var lang_layout_webviewmode={ - "ja":"WebView優先", - "en":"Prefer WebView" -} -//ui/spotify.js -var lang_spotify_img={ - "ja":"アルバムアートワークを添付します。", - "en":"Attach an album artwork" -} -var lang_spotify_imgno={ - "ja":"アルバムアートワークを添付しません。", - "en":"Not ttach an album artwork" -} -var lang_spotify_acct={ - "ja":"アカウント連携をしてください。", - "en":"Connect TheDesk to Spotify" -} -var lang_spotify_np={ - "ja":"NowPlaying文書を更新しました。", - "en":"Done:templete of NowPlaying" -} -//userdata/his-data.js -var lang_hisdata_frcreq={ - "ja":"Mastodon 2.4.3~が必要です", - "en":"Required Mastodon 2.4.3 and above" -} -var lang_hisdata_frcwarn={ - "ja":"非フォローだけど絡みがある時に表示されます。", - "en":"Unfollow accounts will be shown." -} -var lang_hisdata_taketime={ - "ja":"30秒から数分かかります", - "en":"It will take 30s ~ several minutes" -} -var lang_hisdata_notonmisskey={ - "ja":"このシステムはMisskeyにはありません。", - "en":"Misskey is unable to request." -} -//userdata/showOnTL.js -var lang_showontl_movetxt={ - "ja":"このアカウントは移行しています", - "en":"This account was moved" -} -var lang_showontl_movebtn={ - "ja":"移行先を見る", - "en":"Continue on the new account" -} -var lang_showontl_botacct={ - "ja":"botアカウント", - "en":"[bot]" -} -var lang_showontl_followed={ - "ja":"フォローされています", - "en":"Following you" -} -var lang_showontl_notf={ - "ja":"通知", - "en":"Notification " -} -var lang_showontl_domain={ - "ja":"ドメイン", - "en":"Domain " -} -var lang_showontl_listwarn={ - "ja":"リストに追加するためにはフォローが必要です。", - "en":"Follow to add this user to lists." -} \ No newline at end of file diff --git a/app/js/login/login.js b/app/js/login/login.js index ab60074a..c3f8e755 100644 --- a/app/js/login/login.js +++ b/app/js/login/login.js @@ -173,7 +173,7 @@ function getdata() { console.log(json); if (json.error) { console.error("Error:" + json.error); - Materialize.toast(lang_fatalerroroccured[lang]+"Error:" + json.error, + Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error, 5000); return; } @@ -223,7 +223,7 @@ function getdataAdv(domain, at) { console.log(json); if (json.error) { console.error("Error:" + json.error); - Materialize.toast(lang_fatalerroroccured[lang]+"Error:" + json.error, + Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error, 5000); return; } @@ -285,7 +285,7 @@ function refresh(target) { console.log(json); if (json.error) { console.error("Error:" + json.error); - Materialize.toast(lang_fatalerroroccured[lang]+"Error:" + json.error, + Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error, 5000); return; } @@ -444,7 +444,7 @@ function multiSelector() { var sel; if(obj.length<1){ $("#src-acct-sel").html(''); - $("#add-acct-sel").html(''); + $("#add-acct-sel").html(''); }else{ Object.keys(obj).forEach(function(key) { var acct = obj[key]; @@ -471,7 +471,7 @@ function multiSelector() { profimg="./img/missing.svg"; } $("#acct-sel-prof").attr("src",profimg); - $("#toot-post-btn").text(lang_toot[lang]+"("+domain+")"); + $("#toot-post-btn").text(lang.lang_toot+"("+domain+")"); if(acct.background && acct.background!="def" && acct.text && acct.text!="def"){ $("#toot-post-btn").removeClass("indigo"); $("#toot-post-btn").css("background-color","#"+acct.background); @@ -498,7 +498,7 @@ function multiSelector() { }); $("#src-acct-sel").append(''); - $("#add-acct-sel").append(''); + $("#add-acct-sel").append(''); } $('select').material_select('update'); } diff --git a/app/js/login/manager.js b/app/js/login/manager.js index 3de01fe9..7b41e8da 100644 --- a/app/js/login/manager.js +++ b/app/js/login/manager.js @@ -43,11 +43,11 @@ function load() { name + '' + escapeHTML(acct.user) + '@' + acct.domain + '
info'+lang_manager_info[lang]+'info'+lang.lang_manager_info+'refresh'+lang_manager_refresh[lang]+'refresh'+lang.lang_manager_refresh+'delete'+lang_manager_delete[lang]+'
'+lang_manager_color[lang]+'
'; + ')">delete'+lang.lang_manager_delete+'
'+lang.lang_manager_color+'
'; $("#acct-list").append(templete); colorpicker(key) }); @@ -141,7 +141,7 @@ function multiDel(target) { var multi = localStorage.getItem("multi"); var obj = JSON.parse(multi); //削除確認ダイアログ - if (confirm(obj[target]["user"] + "@" + obj[target]["domain"] +lang_manager_confirm[lang])) { + if (confirm(obj[target]["user"] + "@" + obj[target]["domain"] +lang.lang_manager_confirm)) { Object.keys(obj).forEach(function(key) { var nk=key-1; //公開範囲(差分のみ) @@ -205,7 +205,7 @@ function multiDel(target) { function multiDel2(target) { var multi = localStorage.getItem("multi"); var obj = JSON.parse(multi); - if (confirm(obj[target]["user"] + "@" + obj[target]["domain"] +lang_manager_confirm[lang])) { + if (confirm(obj[target]["user"] + "@" + obj[target]["domain"] +lang.lang_manager_confirm)) { obj.splice(target, 1); var json = JSON.stringify(obj); localStorage.setItem("multi", json); @@ -342,7 +342,7 @@ function misskeyLogin(url) { if(!mkc){ $("#misskeylogin").show(); $("#misskey-url").val(url); - if(confirm(lang_manager_godev[lang])){ + if(confirm(lang.lang_manager_godev)){ const { shell } = require('electron'); @@ -493,7 +493,7 @@ function getdata(domain, at) { console.log(json); if (json.error) { console.error("Error:" + json.error); - Materialize.toast(lang_fatalerroroccured[lang]+"Error:" + json.error, + Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error, 5000); return; } @@ -558,7 +558,7 @@ function refresh(target) { console.log(json); if (json.error) { console.error("Error:" + json.error); - Materialize.toast(lang_fatalerroroccured[lang]+"Error:" + json.error, + Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error, 5000); return; } @@ -647,14 +647,14 @@ function multisel() { console.log(obj.length) if(obj.length<1){ $("#src-acct-sel").html(''); - $("#add-acct-sel").html(''); + $("#add-acct-sel").html(''); }else{ Object.keys(obj).forEach(function(key) { var acct = obj[key]; var list = key * 1 + 1; if (key == last) { sel = "selected"; - mainb='('+lang_manager_def[lang]+')' + mainb='('+lang.lang_manager_def+')' var domain = localStorage.getItem("domain_" + key); var profimg=localStorage.getItem("prof_"+key); var domain=localStorage.getItem("domain_"+key); @@ -677,11 +677,11 @@ function multisel() { function mainacct(){ var acct_id = $("#main-acct-sel").val(); localStorage.setItem("main", acct_id); - Materialize.toast(lang_manager_mainAcct[lang], 3000); + Materialize.toast(lang.lang_manager_mainAcct, 3000); } function colorpicker(key){ temp= - '
'+lang_manager_none[lang]+'
'+ + '
'+lang.lang_manager_none+'
'+ '
'+ '
'+ '
'+ diff --git a/app/js/platform/end.js b/app/js/platform/end.js index 1a9e1aec..57c79d70 100644 --- a/app/js/platform/end.js +++ b/app/js/platform/end.js @@ -136,7 +136,7 @@ function progshow(e) { if(percent<1){ $("#imgup").text(Math.floor(percent*100)+"%"); }else{ - $("#imgup").text(lang_progress[lang]); + $("#imgup").text(lang.lang_progress); } } } diff --git a/app/js/post/bb-md.js b/app/js/post/bb-md.js index 8708f1c1..16638566 100644 --- a/app/js/post/bb-md.js +++ b/app/js/post/bb-md.js @@ -10,7 +10,7 @@ function mdCheck(){ if(localStorage.getItem("post_" + acct_id)){ $("#toot-post-btn").text(localStorage.getItem("post_" + acct_id)+"("+localStorage.getItem("domain_"+acct_id)+")"); }else{ - $("#toot-post-btn").text(lang_toot[lang]+"("+localStorage.getItem("domain_"+acct_id)+")"); + $("#toot-post-btn").text(lang.lang_toot+"("+localStorage.getItem("domain_"+acct_id)+")"); } if(!localStorage.getItem("bb_"+acct_id) && !localStorage.getItem("md_"+acct_id)){ $(".markdown").addClass("hide"); @@ -40,7 +40,7 @@ function mdCheck(){ $("#trendtag").html(""); } if(localStorage.getItem("mode_" + domain)=="misskey"){ - Materialize.toast(lang_bbmd_misskey[lang], 5000); + Materialize.toast(lang.lang_bbmd_misskey, 5000); } if(idata[domain+"_letters"]){ $("#textarea").attr("data-length", idata[domain+"_letters"]) diff --git a/app/js/post/emoji.js b/app/js/post/emoji.js index 4bea8aad..16c0bbc3 100644 --- a/app/js/post/emoji.js +++ b/app/js/post/emoji.js @@ -20,7 +20,7 @@ function emojiToggle() { $("#emoji").removeClass("hide") if (!localStorage.getItem("emoji_" + acct_id)) { var html = - ''; + ''; $("#emoji-list").html(html); } else { emojiList('home'); @@ -68,7 +68,7 @@ function emojiGet(parse) { //リストの描画 function emojiList(target) { - $("#now-emoji").text(lang_emoji_custom[lang]); + $("#now-emoji").text(lang.lang_emoji_custom); var acct_id = $("#post-acct-sel").val(); var start = localStorage.getItem("emojiseek"); if (target == "next") { diff --git a/app/js/post/img.js b/app/js/post/img.js index a07f0e97..51310143 100644 --- a/app/js/post/img.js +++ b/app/js/post/img.js @@ -43,7 +43,7 @@ function pimg(files) { var electron = require("electron"); var ipc = electron.ipcRenderer; ipc.send('bmp-image', [files[i].path,i]); - todo(lang_progress[lang]); + todo(lang.lang_progress); }else{ handleFileUpload(files[i], obj,i); @@ -134,7 +134,7 @@ function media(b64, type, no) { var html = ''; $('#preview').append(html); } else { - $('#preview').append(lang_postimg_previewdis[lang]); + $('#preview').append(lang.lang_postimg_previewdis); } if (!img) { var img = "no-act"; @@ -152,8 +152,8 @@ function media(b64, type, no) { todc(); $(".toot-btn-group").prop("disabled", false); $('select').material_select(); - $("#mec").text(lang_there[lang]); - Materialize.toast(lang_postimg_aftupload[lang], 1000); + $("#mec").text(lang.lang_there); + Materialize.toast(lang.lang_postimg_aftupload, 1000); $("#imgup").text(""); $("#imgsel").show(); localStorage.removeItem("image"); diff --git a/app/js/post/misskeystatus.js b/app/js/post/misskeystatus.js index dfacba95..77b28b50 100644 --- a/app/js/post/misskeystatus.js +++ b/app/js/post/misskeystatus.js @@ -32,7 +32,7 @@ function renoteqt(id, acct_id) { $("#post-acct-sel").val(acct_id); $("#post-acct-sel").prop("disabled", true); $('select').material_select(); - $("#textarea").attr("placeholder",lang_misskeyparse_qt[lang]); + $("#textarea").attr("placeholder",lang.lang_misskeyparse_qt); $("#textarea").focus(); } //Reply @@ -44,7 +44,7 @@ function misskeyreply(id, acct_id) { $("#post-acct-sel").val(acct_id); $("#post-acct-sel").prop("disabled", true); $('select').material_select(); - $("#textarea").attr("placeholder",lang_misskeyparse_qt[lang]); + $("#textarea").attr("placeholder",lang.lang_misskeyparse_qt); $("#textarea").focus(); } //Reaction diff --git a/app/js/post/post.js b/app/js/post/post.js index 665e6efe..3625e00b 100644 --- a/app/js/post/post.js +++ b/app/js/post/post.js @@ -20,7 +20,7 @@ function post(mode,postvis) { if(domain=="theboss.tech"){ if(~str.indexOf("#")){ if(str.indexOf("#theboss_tech")=="-1"){ - if(!confirm(lang_post_tagTL[lang])){ + if(!confirm(lang.lang_post_tagTL)){ return false; } } @@ -29,7 +29,7 @@ function post(mode,postvis) { if(domain=="dtp-mstdn.jp"){ if(~str.indexOf("#")){ if(str.indexOf("#dtp")=="-1"){ - if(!confirm(lang_post_tagTL[lang])){ + if(!confirm(lang.lang_post_tagTL)){ return false; } } @@ -52,9 +52,9 @@ function post(mode,postvis) { var plus=str.replace(/\n/g,"").slice(0,10)+"..."; const options = { type: 'info', - title: lang_post_cwtitle[lang], - message: lang_post_cwtxt[lang]+plus, - buttons: [lang_post_btn1[lang],lang_post_btn2[lang], lang_post_btn3[lang]] + title: lang.lang_post_cwtitle, + message: lang.lang_post_cwtxt+plus, + buttons: [lang.lang_post_btn1,lang.lang_post_btn2, lang.lang_post_btn3] } dialog.showMessageBox(options, function(arg) { if(arg==1){ @@ -108,7 +108,7 @@ function post(mode,postvis) { //ここに非公開・未収載タグについてwarn if(~str.indexOf("#")){ if(vis == "local" || vis=="unlisted" || vis=="direct" || vis=="private"){ - if(!confirm(lang_post_tagVis[lang])){ + if(!confirm(lang.lang_post_tagVis)){ return false; } } @@ -233,7 +233,7 @@ function clear() { if(localStorage.getItem("stable")){ $("#textarea").val(localStorage.getItem("stable")); } - $("#textarea").attr("placeholder", lang_toot[lang]); + $("#textarea").attr("placeholder", lang.lang_toot); $("#reply").val(""); $("#media").val(""); var cwt = localStorage.getItem("cw-text"); @@ -252,13 +252,13 @@ function clear() { $("#cw").addClass("cw-avail"); $("#cw-text").show(); } - $("#rec").text(lang_no[lang]); - $("#mec").text(lang_nothing[lang]); + $("#rec").text(lang.lang_no); + $("#mec").text(lang.lang_nothing); loadVis(); $("#nsfw").removeClass("yellow-text"); $("#nsfw").html("visibility_off"); $("#nsfw").removeClass("nsfw-avail"); - $("#nsc").text(lang_nothing[lang]); + $("#nsc").text(lang.lang_nothing); $("#drag").css("background-color", "#e0e0e0"); $("#preview").html(""); $(".toot-btn-group").prop("disabled", false); diff --git a/app/js/post/status.js b/app/js/post/status.js index 0b645cf0..06ac9bb6 100644 --- a/app/js/post/status.js +++ b/app/js/post/status.js @@ -43,7 +43,7 @@ function fav(id, acct_id, remote) { $(".fav_" + id).addClass("yellow-text"); } }else{ - Materialize.toast(lang_status_favWarn[lang], 1000); + Materialize.toast(lang.lang_status_favWarn, 1000); } } } @@ -90,7 +90,7 @@ function rt(id, acct_id, remote) { $(".rt_" + id).addClass("teal-text"); } } else { - Materialize.toast(lang_status_btWarn[lang], 1000); + Materialize.toast(lang.lang_status_btWarn, 1000); } } } @@ -141,10 +141,10 @@ function follow(acct_id,remote) { console.log(json); if ($("#his-data").hasClass("following")) { $("#his-data").removeClass("following"); - $("#his-follow-btn").text(lang_status_follow[lang]); + $("#his-follow-btn").text(lang.lang_status_follow); } else { $("#his-data").addClass("following"); - $("#his-follow-btn").text(lang_status_unfollow[lang]); + $("#his-follow-btn").text(lang.lang_status_unfollow); } } } @@ -174,10 +174,10 @@ function block(acct_id) { if (httpreq.readyState == 4) { if ($("#his-data").hasClass("blocking")) { $("#his-data").removeClass("blocking"); - $("#his-block-btn").text(lang_status_block[lang]); + $("#his-block-btn").text(lang.lang_status_block); } else { $("#his-data").addClass("blocking"); - $("#his-block-btn").text(lang_status_unblock[lang]); + $("#his-block-btn").text(lang.lang_status_unblock); } } } @@ -216,10 +216,10 @@ function mute(acct_id) { if (httpreq.readyState == 4) { if ($("#his-data").hasClass("muting")) { $("#his-data").removeClass("muting"); - $("#his-mute-btn").text(lang_status_mute[lang]); + $("#his-mute-btn").text(lang.lang_status_mute); } else { $("#his-data").addClass("muting"); - $("#his-mute-btn").text(lang_status_unmute[lang]); + $("#his-mute-btn").text(lang.lang_status_unmute); } } } @@ -252,7 +252,7 @@ function del(id, acct_id) { } //redraft function redraft(id, acct_id){ - if(confirm(lang_status_redraft[lang])){ + if(confirm(lang.lang_status_redraft)){ show(); del(id, acct_id); $("#post-acct-sel").prop("disabled", true); @@ -367,7 +367,7 @@ function empUser(){ if(!obj){ var obj=[]; obj.push(id); - Materialize.toast(id+lang_status_emphas[lang], 4000); + Materialize.toast(id+lang.lang_status_emphas, 4000); }else{ var can; Object.keys(obj).forEach(function(key) { @@ -377,7 +377,7 @@ function empUser(){ }else{ can=true; obj.splice(key, 1); - Materialize.toast(id+lang_status_unemphas[lang], 4000); + Materialize.toast(id+lang.lang_status_unemphas, 4000); } }); } @@ -408,10 +408,10 @@ function pinUser(){ console.log(json); if ($("#his-end-btn").hasClass("endorsed")) { $("#his-end-btn").removeClass("endorsed") - $("#his-end-btn").text(lang_status_endorse[lang]) + $("#his-end-btn").text(lang.lang_status_endorse) } else { $("#his-end-btn").addClass("endorsed") - $("#his-end-btn").text(lang_status_unendorse[lang]) + $("#his-end-btn").text(lang.lang_status_unendorse) } } @@ -420,7 +420,7 @@ function pinUser(){ //URLコピー function tootUriCopy(url){ execCopy(url); - Materialize.toast(lang_details_url[lang], 1500); + Materialize.toast(lang.lang_details_url, 1500); } //他のアカウントで… diff --git a/app/js/post/suggest.js b/app/js/post/suggest.js index b261cbdf..d0af6766 100644 --- a/app/js/post/suggest.js +++ b/app/js/post/suggest.js @@ -18,7 +18,7 @@ input.addEventListener("focus", function() { if(semoji){ var obj = JSON.parse(localStorage.getItem("emoji_" + acct_id)); if(!obj){ - var ehtml=lang_suggest_nodata[lang]; + var ehtml=lang.lang_suggest_nodata; }else{ var num = obj.length; var ehtml=""; diff --git a/app/js/post/use-txtbox.js b/app/js/post/use-txtbox.js index e2d71325..38bfd955 100644 --- a/app/js/post/use-txtbox.js +++ b/app/js/post/use-txtbox.js @@ -5,11 +5,11 @@ function re(id,at,acct_id,mode){ $("#reply").val(id); var te=$("#textarea").val(); $("#textarea").val("@"+at+" "+te); - $("#rec").text(lang_yesno[lang]); + $("#rec").text(lang.lang_yesno); $("#post-acct-sel").val(acct_id); $("#post-acct-sel").prop("disabled", true); $('select').material_select(); - $("#textarea").attr("placeholder",lang_usetxtbox_reply[lang]); + $("#textarea").attr("placeholder",lang.lang_usetxtbox_reply); $("#textarea").focus(); var profimg=localStorage.getItem("prof_"+acct_id); if(!profimg){ diff --git a/app/js/tl/card.js b/app/js/tl/card.js index 174a46fc..4da9d56e 100644 --- a/app/js/tl/card.js +++ b/app/js/tl/card.js @@ -64,7 +64,7 @@ function additional(acct_id, tlid) { }).then(function(json) { if (json.title) { $("[toot-id=" + id + "] .additional").html( - "URL"+lang_cards_check[lang]+":
Title:" + json.title + "
" + + "URL"+lang.lang_cards_check+":
Title:" + json.title + "
" + json.description + "
"); $("[toot-id=" + id + "] a:not(.parsed)").addClass("parsed"); $("[toot-id=" + id + "]").addClass("parsed"); @@ -149,7 +149,7 @@ function additionalIndv(tlid, acct_id, id) { }).then(function(json) { if (json.title) { $("[toot-id=" + id + "] .additional").html( - "URL"+lang_cards_check[lang]+":
Title:" + json.title + "
" + + "URL"+lang.lang_cards_check+":
Title:" + json.title + "
" + json.description + "
"); $("[toot-id=" + id + "] a:not(.parsed)").addClass("parsed"); $("[toot-id=" + id + "]").addClass("parsed"); @@ -193,11 +193,11 @@ function additionalIndv(tlid, acct_id, id) { }else{ if (json.title) { $("[toot-id=" + id + "] .additional").html( - "URL"+lang_cards_check[lang]+":
Title:" + escapeHTML(json.title) + "
" + + "URL"+lang.lang_cards_check+":
Title:" + escapeHTML(json.title) + "
" + escapeHTML(json.description) + "
"); } if (json.html) { - $("[toot-id=" + id + "] .additional").html(json.html+'picture_in_picture_alt'); + $("[toot-id=" + id + "] .additional").html(json.html+'picture_in_picture_alt'); } } diff --git a/app/js/tl/datails.js b/app/js/tl/datails.js index c2b63654..eb4ec0bf 100644 --- a/app/js/tl/datails.js +++ b/app/js/tl/datails.js @@ -1,6 +1,6 @@ //トゥートの詳細 function details(id, acct_id, tlid) { - $(".toot-reset").html(lang_details_nodata[lang]); + $(".toot-reset").html(lang.lang_details_nodata); var html = $("#timeline_"+tlid+" [toot-id=" + id + "]").html(); $("#toot-this").html(html); $('#tootmodal').modal('open'); @@ -139,7 +139,7 @@ function replyTL(id, acct_id) { if(localStorage.getItem("mode_" + domain)=="misskey"){ var templete = misskeyParse([json], '', acct_id,"","",mute); $("#toot-after").prepend(templete); - $("#toot-after .hide").html(lang_details_filtered[lang]); + $("#toot-after .hide").html(lang.lang_details_filtered); $("#toot-after .by_filter").css("display","block"); $("#toot-after .by_filter").removeClass("hide"); var rep="_replyIds"; @@ -149,7 +149,7 @@ function replyTL(id, acct_id) { }else{ var templete = parse([json], '', acct_id,"","",mute); $("#toot-reply").prepend(templete); - $("#toot-reply .hide").html(lang_details_filtered[lang]); + $("#toot-reply .hide").html(lang.lang_details_filtered); $("#toot-reply .by_filter").css("display","block"); $("#toot-reply .by_filter").removeClass("hide"); jQuery("time.timeago").timeago(); @@ -199,7 +199,7 @@ function context(id, acct_id) { console.log(json); var templete = misskeyParse(json, '', acct_id,"","",[]); $("#toot-reply").html(templete); - $("#toot-reply .hide").html(lang_details_filtered[lang]); + $("#toot-reply .hide").html(lang.lang_details_filtered); $("#toot-reply .by_filter").css("display","block"); $("#toot-reply .by_filter").removeClass("hide"); jQuery("time.timeago").timeago(); @@ -211,7 +211,7 @@ function context(id, acct_id) { } var templete = parse(json.descendants, '', acct_id,"","",mute); $("#toot-after").html(templete); - $("#toot-after .hide").html(lang_details_filtered[lang]); + $("#toot-after .hide").html(lang.lang_details_filtered); $("#toot-after .by_filter").css("display","block"); $("#toot-after .by_filter").removeClass("hide"); jQuery("time.timeago").timeago(); @@ -368,10 +368,10 @@ function cbCopy(mode){ if(mode=="emb"){ var emb=''; execCopy(emb) - Materialize.toast(lang_details_embed[lang], 1500); + Materialize.toast(lang.lang_details_embed, 1500); }else{ if(execCopy(url)){ - Materialize.toast(lang_details_url[lang], 1500); + Materialize.toast(lang.lang_details_url, 1500); } } @@ -387,7 +387,7 @@ function staCopy(id){ html = html.replace(//g, "$1"); html=$.strip_tags(html); if(execCopy(html)){ - Materialize.toast(lang_details_txt[lang], 1500); + Materialize.toast(lang.lang_details_txt, 1500); } } diff --git a/app/js/tl/filter.js b/app/js/tl/filter.js index 1ee5b67b..dd9de540 100644 --- a/app/js/tl/filter.js +++ b/app/js/tl/filter.js @@ -348,4 +348,52 @@ function filterUpdateInternal(json,type){ ')" class="setting nex">deleteOn削除捕捉リセット
-*/ \ No newline at end of file +*/ +//通知フィルター +function exclude(key){ + var excludetxt=""; + if($('#exc-reply-'+key+':checked').val()){ + excludetxt="?exclude_types[]=mention" + var reply=true + }else{ + var reply=false; + } + if($('#exc-fav-'+key+':checked').val()){ + if(reply){ + excludetxt=excludetxt+"&exclude_types[]=favourite" + }else{ + excludetxt="?exclude_types[]=favourite" + } + var fav=true + }else{ + var fav=false; + } + if($('#exc-bt-'+key+':checked').val()){ + if(reply || fav){ + excludetxt=excludetxt+"&exclude_types[]=reblog" + }else{ + excludetxt="?exclude_types[]=reblog" + } + var bt=true + }else{ + var bt=false; + } + if($('#exc-follow-'+key+':checked').val()){ + if(reply || bt || fav){ + excludetxt=excludetxt+"&exclude_types[]=follow" + }else{ + excludetxt="?exclude_types[]=follow" + } + }else{ + } + localStorage.setItem("exclude-"+key,excludetxt) + parseColumn(); +} +function excludeCk(key,target){ + var exc=localStorage.getItem("exclude-"+key); + if(~exc.indexOf(target)){ + return "checked" + }else{ + return ""; + } +} \ No newline at end of file diff --git a/app/js/tl/list.js b/app/js/tl/list.js index bd810b85..428188bb 100644 --- a/app/js/tl/list.js +++ b/app/js/tl/list.js @@ -36,12 +36,12 @@ function list(){ Object.keys(json).forEach(function(key) { var list = json[key]; lists = lists + list.title+':'+lang_list_show[lang]+'/'+lang_list_users[lang]+'
'; + '\')" class="pointer">'+lang.lang_list_show+'/'+lang.lang_list_users+'
'; }); $("#lists").html(lists); }else{ - $("#lists").html(lang_list_nodata[lang]); + $("#lists").html(lang.lang_list_nodata); } }); } @@ -93,11 +93,11 @@ function listUser(id,acct_id){ var lists = ""; var templete = userparse(json,'',acct_id); if(!json[0]){ - templete=lang_list_nouser[lang]; + templete=lang.lang_list_nouser; } $("#lists-user").html(templete); }else{ - $("#lists-user").html(lang_list_nouser[lang]); + $("#lists-user").html(lang.lang_list_nouser); } }); } @@ -119,7 +119,7 @@ function hisList(user,acct_id){ console.error(error); }).then(function(json) { if (json) { - var lists = lang_list_add[lang]+"
"; + var lists = lang.lang_list_add+"
"; Object.keys(json).forEach(function(key) { var list = json[key]; lists = lists + '"; + var lists = lang.lang_list_remove+"
"; Object.keys(json).forEach(function(key) { var list = json[key]; lists = lists + '
'; if (toot.type == "reply") { - var what = lang_parse_mentioned[lang]; + var what = lang.lang_parse_mentioned; var icon = ''; noticeavatar=""; } else if (toot.type == "renote") { - var what = lang_misskeyparse_renoted[lang]; + var what = lang.lang_misskeyparse_renoted; var icon = ''; } else if (toot.type == "quote") { - var what = lang_misskeyparse_quoted[lang]; + var what = lang.lang_misskeyparse_quoted; var icon = ''; } else if (toot.type == "reaction") { - var what = lang_misskeyparse_reaction[lang]; + var what = lang.lang_misskeyparse_reacted; var reactions={ "like":"👍", "love":"💓", @@ -214,7 +214,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { var icon = 'info'; } var noticetext = '' + date(toot.createdAt, + 'absolute') + '('+lang.lang_parse_notftime+')">' + date(toot.createdAt, datetype) + ''+icon+'' + dis_name + @@ -278,7 +278,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { }else{ var if_notf=""; if (toot.renote) { - var rebtxt = lang_parse_btedsimple[lang]; + var rebtxt = lang.lang_parse_btedsimple; var rticon = "fa-retweet light-blue-text"; var notice = ''+ dis_name + "(@" + toot.user.username + ")
"; @@ -353,19 +353,19 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { var spoiler = "cw cw_hide_" + toot.id; var api_spoil = "gray"; var spoiler_show = '
'+lang_parse_cwshow[lang]+'
'; + '\')" class="nex parsed">'+lang.lang_parse_cwshow+'
'; } else { var ct1 = nl2br(toot.text).split('
').length -2; var ct2 = nl2br(toot.text).split('
').length -2; if(ct1>ct2){ var ct= ct1; }else{ var ct= ct2; } if ((sent < ct && $.mb_strlen($.strip_tagstemp(toot.text)) > 5) || ($.strip_tagstemp(toot.text).length > ltr && $.mb_strlen($.strip_tagstemp(toot.text)) > 5)) { - var content = ''+lang_parse_fulltext[lang]+'
' + escapeHTMLtemp(toot.text) + var content = ''+lang.lang_parse_fulltext+'
' + escapeHTMLtemp(toot.text) var spoil = '' + $.mb_substr($.strip_tagstemp( toot.text), 0, 100) + - ''+lang_parse_autofold[lang]+''; + '
'+lang.lang_parse_autofold+''; var spoiler = "cw cw_hide_" + toot.id; var spoiler_show = ''+lang_parse_more[lang]+'
'; + '\')" class="nex parsed">'+lang.lang_parse_more+'
'; } else { var content = escapeHTMLtemp(toot.text); if(toot.cw){ @@ -384,7 +384,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { ); if (urls) { var analyze = ''+lang_parse_url[lang]+'
'; + ',\'' + id + '\')" class="add-show pointer">'+lang.lang_parse_url+'
'; } else { var analyze = ''; } @@ -489,8 +489,8 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { Object.keys(toot.tags).forEach(function(key4) { var tag = toot.tags[key4]; var tags = '#' + tag + '#' + tag + ':TL Toot '+ - 'Pin '; + ',\'add\')" class="pointer parsed" title="' +lang.lang_parse_tagTL.replace("{{tag}}" ,'#'+tag)+ '">TL Toot '+ + 'Pin
'; content=content.replace("#"+tag,tags); }); //tags = '
' + tags + '
'; @@ -500,23 +500,23 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { var visen = toot.visibility; if (visen == "public") { var vis = - 'public'; + 'public'; var can_rt = ""; } else if (visen == "home") { var vis = - 'lock_open'; + 'lock_open'; var can_rt = ""; } else if (visen == "followers") { var vis = - 'people'; + 'people'; var can_rt = ""; } else if (visen == "private") { var vis = - 'lock'; + 'lock'; var can_rt = ""; } else if (visen == "specified") { var vis = - 'mail'; + 'mail'; var can_rt = "hide"; } if (toot.user.username == localStorage.getItem("user_" + acct_id)) { @@ -703,7 +703,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { toot.user.username + '
' + '
' + + '('+lang.lang_parse_clickcopyurl+')">' + date(toot.createdAt, datetype) + '' + '
' + '
'+tickerdom+'' + content + @@ -734,30 +734,30 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { '
'+ '
' + '
'+vis+'
'+ - '' + + '' + '
' + + '\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_replyto+'">
' + '
' + '
' + + ',\'misskey.xyz\',\'misskey.xyz\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_renoteqt+'">
' + '
' + '
' + + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_del+'">' + '
' + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_pin+'">' +''+trans+ + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_redraft+'">redo'+trans+ 'via ' + via + ''+ @@ -788,10 +788,10 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) { } else { var auth = ""; } - var ftxt=lang_parse_followed[lang]; + var ftxt=lang.lang_parse_followed; if(popup > 0 || popup==-1){ var notftext='' + date(toot.createdAt, + 'absolute') + '('+lang.lang_parse_notftime+')">' + date(toot.createdAt, datetype) + ''+ftxt+'
'; var toot = toot.user; diff --git a/app/js/tl/notification.js b/app/js/tl/notification.js index 016b91df..6ee51f95 100644 --- a/app/js/tl/notification.js +++ b/app/js/tl/notification.js @@ -1,6 +1,13 @@ //通知 //取得+Streaming接続 -function notf(acct_id, tlid, sys) { +function notf(acct_id, tlid, sys){ + if (sys == "direct") { + notfColumn(acct_id, tlid, sys) + } else { + notfCommon(acct_id, tlid, sys) + } +} +function notfColumn(acct_id, tlid, sys){ todo("Notifications Loading..."); var native=localStorage.getItem("nativenotf"); var at = localStorage.getItem("acct_"+ acct_id + "_at"); @@ -22,7 +29,12 @@ function notf(acct_id, tlid, sys) { } }else{ var misskey=false; - var start = "https://" + domain + "/api/v1/notifications"; + if(localStorage.getItem("exclude-"+tlid)){ + var exc=localStorage.getItem("exclude-"+tlid); + }else{ + var exc=""; + } + var start = "https://" + domain + "/api/v1/notifications"+exc; var i={ method: 'GET', headers: { @@ -32,6 +44,7 @@ function notf(acct_id, tlid, sys) { } } fetch(start, i).then(function(response) { + console.log(response.headers.get('link')); return response.json(); }).catch(function(error) { todo(error); @@ -82,12 +95,177 @@ function notf(acct_id, tlid, sys) { } }); - - if (sys == "direct") { - $("#timeline_" + tlid).html(templete); - } else { - $("div[data-notf=" + acct_id +"]").html(templete); + $("#timeline_" + tlid).html(templete); + $("#landing_" + tlid).hide(); + jQuery("time.timeago").timeago(); } + $("#notf-box").addClass("fetched"); + todc(); + }); + if(!misskey){ + if(localStorage.getItem("streaming_" + acct_id)){ + var wss=localStorage.getItem("streaming_" + acct_id) + }else{ + var wss="wss://"+domain + } + var start = wss + "/api/v1/streaming/?stream=user&access_token=" + + at; + }else{ + var start = "wss://" + domain + "/?i=" + + at; + } + + console.log(start); + var wsid = websocketNotf.length; + websocketNotf[acct_id] = new WebSocket(start); + console.log(websocketNotf); + websocketNotf[acct_id].onopen = function(mess) { + console.log("Connect Streaming API(Notf):"); + console.log(mess); + $("i[data-notf=" + acct_id +"]").removeClass("red-text"); + + } + websocketNotf[acct_id].onmessage = function(mess) { + console.log("Receive Streaming API(Notf):"+acct_id); + var popup = localStorage.getItem("popup"); + if (!popup) { + popup = 0; + } + console.log(domain) + if(misskey){ + console.log("misskey") + console.log(JSON.parse(mess.data)); + if (JSON.parse(mess.data).type == "notification") { + var obj = JSON.parse(mess.data).body; + console.log(obj); + if(obj.type!="follow"){ + + templete = misskeyParse([obj], 'notf', acct_id, 'notf', popup); + }else{ + templete = misskeyUserparse([obj], 'notf', acct_id, 'notf', popup); + } + if(obj.type=="reaction"){ + console.log("refresh") + reactRefresh(acct_id,obj.note.id) + } + if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){ + $("div[data-notf=" + acct_id +"]").prepend(templete); + } + jQuery("time.timeago").timeago(); + }else if(JSON.parse(mess.data).type == "note-updated"){ + var obj = JSON.parse(mess.data).body.note; + reactRefreshCore(obj) + } + }else{ + var obj = JSON.parse(JSON.parse(mess.data).payload); + console.log(obj); + var type = JSON.parse(mess.data).event; + if (type == "notification") { + var templete=""; + localStorage.setItem("lastnotf_" + acct_id,obj.id); + if(obj.type!="follow"){ + templete = parse([obj], 'notf', acct_id, 'notf', popup); + }else{ + templete = userparse([obj], 'notf', acct_id, 'notf', popup); + } + if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){ + $(".tl[data-notf=" + acct_id +"]").prepend(templete); + } + jQuery("time.timeago").timeago(); + } else if (type == "delete") { + $("[toot-id=" + obj + "]").hide(); + $("[toot-id=" + obj + "]").remove(); + } + } + } + websocketNotf[acct_id].onerror = function(error) { + console.error('WebSocket Error ' + error); + }; +} +function notfCommon(acct_id, tlid, sys) { + todo("Notifications Loading..."); + var native=localStorage.getItem("nativenotf"); + var at = localStorage.getItem("acct_"+ acct_id + "_at"); + if(!native){ + native="yes"; + } + var domain = localStorage.getItem("domain_" + acct_id); + if(localStorage.getItem("mode_" + domain)=="misskey"){ + var misskey=true; + var start = "https://" + domain + "/api/i/notifications"; + var i={ + method: 'POST', + headers: { + 'content-type': 'application/json', + }, + body:JSON.stringify({ + i:at + }) + } + }else{ + var misskey=false; + var start = "https://" + domain + "/api/v1/notifications"; + var i={ + method: 'GET', + headers: { + 'content-type': 'application/json', + 'Authorization': 'Bearer ' + at + }, + } + } + fetch(start, i).then(function(response) { + console.log(response.headers.get('link')); + return response.json(); + }).catch(function(error) { + todo(error); + console.error(error); + }).then(function(json) { + if(json[0]){ + var templete=""; + var lastnotf=localStorage.getItem("lastnotf_" + acct_id); + localStorage.setItem("lastnotf_" + acct_id,json[0].id); + Object.keys(json).forEach(function(key) { + var obj = json[key]; + if(lastnotf==obj.id && key>0 && native=="yes"){ + var ct=key; + if(key>14){ + ct="15+"; + } + var electron = require("electron"); + var ipc = electron.ipcRenderer; + var os = electron.remote.process.platform; + var options = { + body: ct+lang_notf_new[lang], + icon: localStorage.getItem("prof_"+acct_id) + }; + if(os=="darwin"){ + var n = new Notification('TheDesk:'+domain, options); + }else{ + ipc.send('native-notf', ['TheDesk:'+domain,ct+lang_notf_new[lang],localStorage.getItem("prof_"+acct_id)]); + } + + } + if(localStorage.getItem("filter_"+ acct_id)!="undefined"){ + var mute=getFilterType(JSON.parse(localStorage.getItem("filter_"+ acct_id)),"notif"); + }else{ + var mute=[]; + } + if(obj.type!="follow"){ + if(misskey){ + templete = templete+misskeyParse([obj], 'notf', acct_id, 'notf', -1, mute); + }else{ + templete = templete+parse([obj], 'notf', acct_id, 'notf', -1, mute); + } + }else{ + if(misskey){ + templete = templete+misskeyUserparse([obj], 'notf', acct_id, 'notf', -1, mute); + }else{ + templete = templete+userparse([obj.account], 'notf', acct_id, 'notf', -1); + } + + } + }); + $("div[data-notf=" + acct_id +"]").html(templete); $("#landing_" + tlid).hide(); jQuery("time.timeago").timeago(); } diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index 60913006..83db49be 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -183,24 +183,24 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) { '" width="20" class="notf-icon prof-img" user="' + toot.account.acct + '">'; if (toot.type == "mention") { - var what = lang_parse_mentioned[lang]; + var what = lang.lang_parse_mentioned; var icon = "fa-share teal-text"; noticeavatar=""; } else if (toot.type == "reblog") { - var what = lang_parse_bted[lang]; + var what = lang.lang_parse_bted; var icon = "fa-retweet light-blue-text"; if(!locale && localStorage.getItem("bt_" + acct_id)){ what = localStorage.getItem("bt_" + acct_id); } } else if (toot.type == "favourite") { - var what = lang_parse_faved[lang]; + var what = lang.lang_parse_faved; var icon = "fa-star yellow-text"; if(!locale && localStorage.getItem("fav_" + acct_id)){ what = localStorage.getItem("fav_" + acct_id); } } var noticetext = '' + date(toot.created_at, + 'absolute') + '('+lang.lang_parse_notftime+')">' + date(toot.created_at, datetype) + '' + dis_name + @@ -291,7 +291,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) { ''; - var rebtxt = lang_parse_btedsimple[lang]; + var rebtxt = lang.lang_parse_btedsimple; var rticon = "fa-retweet light-blue-text"; if(localStorage.getItem("domain_" + acct_id)=="imastodon.net" && !locale){ rebtxt = ":「わかるわ」"; @@ -380,19 +380,19 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) { var spoiler = "cw cw_hide_" + toot.id; var api_spoil = "gray"; var spoiler_show = ''+lang_parse_cwshow[lang]+'
'; + '\')" class="nex parsed">'+lang.lang_parse_cwshow+'
'; } else { var ct1 = toot.content.split('

').length + toot.content.split('
').length -2; var ct2 = toot.content.split('

').length + toot.content.split('
').length -2; if(ct1>ct2){ var ct= ct1; }else{ var ct= ct2; } if ((sent < ct && $.mb_strlen($.strip_tags(toot.content)) > 5) || ($.strip_tags(toot.content).length > ltr && $.mb_strlen($.strip_tags(toot.content)) > 5)) { - var content = ''+lang_parse_fulltext[lang]+'
' + toot.content + var content = ''+lang.lang_parse_fulltext+'
' + toot.content var spoil = '' + $.mb_substr($.strip_tags( toot.content), 0, 100) + - ''+lang_parse_autofold[lang]+''; + ''+lang.lang_parse_autofold+''; var spoiler = "cw cw_hide_" + toot.id; var spoiler_show = ''+lang_parse_more[lang]+'
'; + '\')" class="nex parsed">'+lang.lang_parse_more+'
'; } else { var content = toot.content; var spoil = escapeHTML(toot.spoiler_text); @@ -405,7 +405,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) { ); if (urls) { var analyze = ''+lang_parse_url[lang]+'
'; + ',\'' + id + '\')" class="add-show pointer">'+lang.lang_parse_url+'
'; } else { var analyze = ''; } @@ -507,8 +507,8 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) { Object.keys(toot.tags).forEach(function(key4) { var tag = toot.tags[key4]; tags = tags + '#' + tag.name + ':TL Toot '+ - 'Pin '; + ',\'add\')" class="pointer" title="' +lang.lang_parse_tagTL.replace("{{tag}}" ,'#'+tag.name)+ '">TL Toot '+ + 'Pin '; }); tags = '
' + tags + '
'; } @@ -526,19 +526,19 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) { var visen = toot.visibility; if (visen == "public") { var vis = - 'public'; + 'public'; var can_rt = ""; } else if (visen == "unlisted") { var vis = - 'lock_open'; + 'lock_open'; var can_rt = ""; } else if (visen == "private") { var vis = - 'lock'; + 'lock'; var can_rt = "hide"; } else if (visen == "direct") { var vis = - 'mail'; + 'mail'; var can_rt = "hide"; } if (toot.account.acct == localStorage.getItem("user_" + acct_id)) { @@ -605,7 +605,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) { } //日本語じゃない if(toot.language!="ja"){ - var trans=''; + var trans=''; }else{ var trans=""; } @@ -621,11 +621,11 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) { analyze=''; } if (cards.title) { - analyze="URL"+lang_cards_check[lang]+":
Title:" + escapeHTML(cards.title) + "
" + + analyze="URL"+lang.lang_cards_check+":
Title:" + escapeHTML(cards.title) + "
" + escapeHTML(cards.description) + "
"; } if (cards.html) { - analyze=cards.html+'picture_in_picture_alt'; + analyze=cards.html+'picture_in_picture_alt'; } } //Ticker @@ -662,7 +662,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) { toot.account.acct + locked + '
' + '
' + + '('+lang.lang_parse_clickcopyurl+')">' + date(toot.created_at, datetype) + '' + '
' + '
'+tickerdom+'
'+ '
' + '
'+vis+'
'+ - '' + + '' + '' + '' + '
' + + '\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_quote+'">
' + '' + '
' + + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_del+'">' + '
' + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_pin+'">' +''+trans+ + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_redraft+'">redo'+trans+ 'via ' + via + ''+ @@ -749,7 +749,7 @@ function userparse(obj, auth, acct_id, tlid, popup) { } else { var auth = ""; } - var ftxt=lang_parse_followed[lang]; + var ftxt=lang.lang_parse_followed; if(!locale && localStorage.getItem("follow_" + acct_id)){ ftxt = localStorage.getItem("follow_" + acct_id); } @@ -857,9 +857,9 @@ function client(name) { var dialog=remote.dialog; const options = { type: 'info', - title: lang_parse_clientop[lang], - message: name+lang_parse_clienttxt[lang], - buttons: [lang_parse_clientno[lang],lang_parse_clientemp[lang], lang_parse_clientmute[lang]] + title: lang.lang_parse_clientop, + message: name+lang.lang_parse_clienttxt, + buttons: [lang.lang_parse_clientno,lang.lang_parse_clientemp, lang.lang_parse_clientmute] } dialog.showMessageBox(options, function(arg) { if(arg==1){ @@ -868,7 +868,7 @@ function client(name) { if(!obj){ var obj=[]; obj.push(name); - Materialize.toast(name+lang_status_emphas[lang], 2000); + Materialize.toast(name+lang.lang_status_emphas, 2000); }else{ var can; Object.keys(obj).forEach(function(key) { @@ -878,12 +878,12 @@ function client(name) { }else{ can=true; obj.splice(key, 1); - Materialize.toast(name+lang_status_unemphas[lang], 2000); + Materialize.toast(name+lang.lang_status_unemphas, 2000); } }); if(!can){ obj.push(name); - Materialize.toast(name+lang_status_emphas[lang], 2000); + Materialize.toast(name+lang.lang_status_emphas, 2000); }else{ } @@ -899,7 +899,7 @@ function client(name) { obj.push(name); var json = JSON.stringify(obj); localStorage.setItem("client_mute", json); - Materialize.toast(name+lang_parse_mute[lang], 2000); + Materialize.toast(name+lang.lang_parse_mute, 2000); }else{ return; } diff --git a/app/js/tl/speech.js b/app/js/tl/speech.js index 543f9494..87f9df11 100644 --- a/app/js/tl/speech.js +++ b/app/js/tl/speech.js @@ -1,5 +1,5 @@ $voise = null; - $voiseName = lang_speech[lang]; + $voiseName = lang.lang_speech; $voices = speechSynthesis.getVoices(); $synthes = new SpeechSynthesisUtterance(); $voise = $.grep($voices, function(n, i){return n.name == $voiseName})[0]; @@ -91,7 +91,7 @@ function voiceSettings(){ localStorage.setItem("voice_speed", $("#voicespeed").val()/10); localStorage.setItem("voice_pitch", $("#voicepitch").val()/50); localStorage.setItem("voice_vol", $("#voicevol").val()/100); - Materialize.toast(lang_speech_refresh[lang], 3000); + Materialize.toast(lang.lang_speech_refresh, 3000); } function voiceSettingLoad(){ var speed=localStorage.getItem("voice_speed"); diff --git a/app/js/tl/src.js b/app/js/tl/src.js index 17ec57f7..c93563e8 100644 --- a/app/js/tl/src.js +++ b/app/js/tl/src.js @@ -98,9 +98,9 @@ function tootsearch(q){ } }); if(!templete){ - templete=lang_details_nodata[lang]; + templete=lang.lang_details_nodata; } - $("#src-contents").html("Tootsearch("+lang_src_ts[lang]+")
" + templete); + $("#src-contents").html("Tootsearch("+lang.lang_src_ts+")
" + templete); jQuery("time.timeago").timeago(); }); } @@ -119,12 +119,12 @@ function graphDraw(tag){ if(max==0){ tags = '

'+ ''+his[0].uses+'toots #' + tag.name + ' '+his[0].accounts+lang_src_people[lang]; + '\',\'add\')" class="pointer">#' + tag.name + ' '+his[0].accounts+lang.lang_src_people; }else{ tags = '

'+ ''+ ''+his[0].uses+'toots #' + tag.name + ' '+his[0].accounts+lang_src_people[lang]; + '\',\'add\')" class="pointer">#' + tag.name + ' '+his[0].accounts+lang.lang_src_people; } return tags; diff --git a/app/js/tl/tag.js b/app/js/tl/tag.js index 9d54ac17..8670c77b 100644 --- a/app/js/tl/tag.js +++ b/app/js/tl/tag.js @@ -56,8 +56,8 @@ function favTag(){ var tags=""; Object.keys(obj).forEach(function(key) { var tag = obj[key]; - tags = tags + '#' + tag + ' TL Toot '+ - ''+lang_tags_realtime[lang]+' '+lang_del[lang]+' '; + tags = tags + '#' + tag + ' TL Toot '+ + ''+lang.lang_tags_realtime+' '+lang.lang_del+' '; }); if(obj.length>0){ $("#taglist").append("My Tags:" + tags); @@ -107,5 +107,5 @@ function tagTL(a,b,c,d){ } function autoToot(tag){ localStorage.setItem("stable",tag); - Materialize.toast(lang_tags_tagwarn[lang].replace("{{tag}}" ,tag).replace("{{tag}}" ,tag),3000); + Materialize.toast(lang.lang_tags_tagwarn +replace("{{tag}}" ,tag).replace("{{tag}}" ,tag),3000); } \ No newline at end of file diff --git a/app/js/tl/tl.js b/app/js/tl/tl.js index 429029cb..6e2d2b6c 100644 --- a/app/js/tl/tl.js +++ b/app/js/tl/tl.js @@ -47,7 +47,7 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) { return; }else if (type == "notf") { //通知なら飛ばす - //notf(acct_id, tlid, 'direct'); + notf(acct_id, tlid, 'direct'); $("#notice_" + tlid).text(cap(type, data, acct_id) + "(" + localStorage.getItem( "user_" + acct_id) + "@" + domain + ")"); $("#notice_icon_" + tlid).text("notifications"); @@ -508,7 +508,7 @@ function cap(type, data, acct_id) { } } else if (type == "local-media") { if(localStorage.getItem("local_" + acct_id) && !locale){ - var response=localStorage.getItem("local_" + acct_id)+"("+lang_tl_media[lang]+")"; + var response=localStorage.getItem("local_" + acct_id)+"("+lang.lang_tl_media +")"; }else{ var response="Local TL(Media)"; } @@ -520,7 +520,7 @@ function cap(type, data, acct_id) { } } else if (type == "pub-media") { if(localStorage.getItem("public_" + acct_id) && !locale){ - var response=localStorage.getItem("public_" + acct_id)+"("+lang_tl_media[lang]+")"; + var response=localStorage.getItem("public_" + acct_id)+"("+lang.lang_tl_media +")"; }else{ var response="Federated TL(Media)"; } @@ -670,7 +670,7 @@ function reconnector(tlid,type,acct_id,data,mode){ } reload(type, '', acct_id, tlid, data, mute, "",voice,mode); } - Materialize.toast(lang_tl_reconnect[lang], 2000); + Materialize.toast(lang.lang_tl_reconnect, 2000); } strAliveInt() \ No newline at end of file diff --git a/app/js/ui/img.js b/app/js/ui/img.js index 84062f74..d32c0b36 100644 --- a/app/js/ui/img.js +++ b/app/js/ui/img.js @@ -134,6 +134,7 @@ function imgCont(type) { if (type == "image") { xhr = new XMLHttpRequest; xhr.open('GET', murl, true); + xhr.responseType = "arraybuffer"; xhr.addEventListener('progress', function (event) { if (event.lengthComputable) { var total=event.total; diff --git a/app/js/ui/settings.js b/app/js/ui/settings.js index 4fad3b5a..152dd06c 100644 --- a/app/js/ui/settings.js +++ b/app/js/ui/settings.js @@ -4,14 +4,14 @@ function settings() { var dd = $("[name=time]:checked").val(); var dt = $("[for="+dd+"]").text(); if (dd != localStorage.getItem("datetype")) { - Materialize.toast(lang_setting_time[lang].replace("{{set}}" ,dt), 3000); + Materialize.toast(lang.lang_setting_time.replace("{{set}}" ,dt), 3000); } localStorage.setItem("datetype", dd); var cd = $("[name=theme]:checked").val(); var ct = $("[for="+cd+"]").html(); if (cd != localStorage.getItem("theme")) { - Materialize.toast(lang_setting_theme[lang].replace("{{set}}" ,ct), 3000); + Materialize.toast(lang.lang_setting_theme.replace("{{set}}" ,ct), 3000); } //テーマはこの場で設定 themes(cd); @@ -20,63 +20,63 @@ function settings() { var nd = $("[name=nsfw]:checked").val(); var nt = $("[for=n_"+nd+"]").text(); if (nd != localStorage.getItem("nsfw")) { - Materialize.toast(lang_setting_nsfw[lang].replace("{{set}}" ,nt), 3000); + Materialize.toast(lang.lang_setting_nsfw.replace("{{set}}" ,nt), 3000); } localStorage.setItem("nsfw", nd); var cwd = $("[name=cw]:checked").val(); var cwt = $("[for=c_"+cwd+"]").text(); if (cwd != localStorage.getItem("cw")) { - Materialize.toast(lang_setting_cw[lang].replace("{{set}}" ,cwt), 3000); + Materialize.toast(lang.lang_setting_cw.replace("{{set}}" ,cwt), 3000); } localStorage.setItem("cw", cwd); var cwtd = $("#cw-text").val(); if (cwtd != localStorage.getItem("cw-text")) { - Materialize.toast(lang_setting_cwtext[lang].replace("{{set}}" ,cwtd), 3000); + Materialize.toast(lang.lang_setting_cwtext.replace("{{set}}" ,cwtd), 3000); } localStorage.setItem("cw-text", cwtd); var cwsd = $("[name=cws]:checked").val(); var cwst = $("[for=cws_"+cwsd+"]").text(); if (cwsd != localStorage.getItem("always-cw")) { - Materialize.toast(lang_setting_cws[lang].replace("{{set}}" ,cwst), 3000); + Materialize.toast(lang.lang_setting_cws.replace("{{set}}" ,cwst), 3000); } localStorage.setItem("always-cw", cwsd); var rpd = $("[name=rp]:checked").val(); var rpt = $("[for=c_"+cwd+"]").text(); if (rpd != localStorage.getItem("replyct")) { - Materialize.toast(lang_setting_rp[lang].replace("{{set}}" ,rpt), 3000); + Materialize.toast(lang.lang_setting_rp.replace("{{set}}" ,rpt), 3000); } localStorage.setItem("replyct", rpd); var visd = $("[name=vis]:checked").val(); var vist = $("[for="+visd+"]").text(); if (visd != localStorage.getItem("vis")) { - Materialize.toast(lang_setting_vis[lang].replace("{{set}}" ,vist), 3000); + Materialize.toast(lang.lang_setting_vis.replace("{{set}}" ,vist), 3000); } localStorage.setItem("vis", visd); var popd = $("#popup").val(); if (popd > 0 && popd != localStorage.getItem("popup")) { - Materialize.toast(lang_setting_popup[lang].replace("{{set}}" ,popd+lang_setting_s[lang]), 3000); + Materialize.toast(lang.lang_setting_popup.replace("{{set}}" ,popd+lang.lang_setting_s), 3000); } else if (popd != localStorage.getItem("popup")) { - Materialize.toast(lang_setting_popup[lang].replace("{{set}}" ,lang_setting_off[lang]), 3000); + Materialize.toast(lang.lang_setting_popup.replace("{{set}}" ,lang.lang_setting_off), 3000); } localStorage.setItem("popup", popd); var gifd = $("[name=gif]:checked").val(); var gift = $("[for=g_"+gifd+"]").text(); if (gifd != localStorage.getItem("gif")) { - Materialize.toast(lang_setting_gif[lang].replace("{{set}}" ,gift), 3000); + Materialize.toast(lang.lang_setting_gif.replace("{{set}}" ,gift), 3000); } localStorage.setItem("gif", gifd); var sentd = $("#sentence").val(); var ltrd = $("#letters").val(); if (sentd != localStorage.getItem("sentence") || ltrd != localStorage.getItem("letters")) { - Materialize.toast(lang_setting_selt[lang].replace("{{set1}}" ,sentd).replace("{{set2}}" ,ltrd), 3000); + Materialize.toast(lang.lang_setting_selt.replace("{{set1}}" ,sentd).replace("{{set2}}" ,ltrd), 3000); } localStorage.setItem("sentence", sentd); localStorage.setItem("letters", ltrd); @@ -84,35 +84,35 @@ function settings() { var csentd = $("#cw_sentence").val(); var cltrd = $("#cw_letters").val(); if (csentd != localStorage.getItem("cw_sentence") || cltrd != localStorage.getItem("cw_letters")) { - Materialize.toast(lang_setting_autocw[lang].replace("{{set1}}" ,csentd).replace("{{set2}}" ,cltrd), 3000); + Materialize.toast(lang.lang_setting_autocw.replace("{{set1}}" ,csentd).replace("{{set2}}" ,cltrd), 3000); } localStorage.setItem("cw_sentence", csentd); localStorage.setItem("cw_letters", cltrd); var widthd = $("#width").val(); if (widthd != localStorage.getItem("width")) { - Materialize.toast(lang_setting_width[lang].replace("{{set}}" ,widthd), 3000); + Materialize.toast(lang.lang_setting_width.replace("{{set}}" ,widthd), 3000); } localStorage.setItem("width", widthd); var imgd = $("[name=img]:checked").val(); var imgt = $("[for=i_"+imgd+"]").text(); if (imgd != localStorage.getItem("img")) { - Materialize.toast(lang_setting_img[lang].replace("{{set}}" ,imgt), 3000); + Materialize.toast(lang.lang_setting_img.replace("{{set}}" ,imgt), 3000); } localStorage.setItem("img", imgd); var fontd = $("#font").val(); if(fontd){ if (fontd != localStorage.getItem("font")) { - Materialize.toast(lang_setting_font[lang].replace("{{set}}" ,fontd), 3000); + Materialize.toast(lang.lang_setting_font.replace("{{set}}" ,fontd), 3000); } localStorage.setItem("font", fontd); themes(); }else{ if(localStorage.getItem("font")){ localStorage.removeItem("font"); - Materialize.toast(lang_setting_font[lang].replace("{{set}}" ,lang_setting_default[lang]), 3000); + Materialize.toast(lang.lang_setting_font.replace("{{set}}" ,lang.lang_setting_default), 3000); themes(); } } @@ -120,90 +120,90 @@ function settings() { var sized = $("#size").val(); if (sized != localStorage.getItem("size")) { - Materialize.toast(lang_setting_size[lang].replace("{{set}}" ,sized), 3000); + Materialize.toast(lang.lang_setting_size.replace("{{set}}" ,sized), 3000); } localStorage.setItem("size", sized); var heid = $("#img-height").val(); if (heid != localStorage.getItem("img-height")) { - Materialize.toast(lang_setting_imgheight[lang].replace("{{set}}" ,heid), 3000); + Materialize.toast(lang.lang_setting_imgheight.replace("{{set}}" ,heid), 3000); } localStorage.setItem("img-height", heid); var tckrd = $("[name=ticker]:checked").val(); var tckrt = $("[for=ticker_"+tckrd+"]").text(); if (tckrd != localStorage.getItem("ticker_ok")) { - Materialize.toast(lang_setting_ticker[lang].replace("{{set}}" ,tckrt), 3000); + Materialize.toast(lang.lang_setting_ticker.replace("{{set}}" ,tckrt), 3000); } localStorage.setItem("ticker_ok", tckrd); var boxd = $("[name=box]:checked").val(); var boxt = $("[for=bx_"+boxd+"]").text(); if (boxd != localStorage.getItem("box")) { - Materialize.toast(lang_setting_box[lang].replace("{{set}}" ,boxt), 3000); + Materialize.toast(lang.lang_setting_boxConfirm.replace("{{set}}" ,boxt), 3000); } localStorage.setItem("box", boxd); var tagd = $("[name=tag]:checked").val(); var tagt = $("[for=t_"+tagd+"]").text(); if (tagd != localStorage.getItem("tag-range")) { - Materialize.toast(lang_setting_tag[lang].replace("{{set}}" ,tagt), 3000); + Materialize.toast(lang.lang_setting_tag.replace("{{set}}" ,tagt), 3000); } localStorage.setItem("tag-range", tagd); var uld = $("[name=ul]:checked").val(); var ult = $("[for=ul_"+uld+"]").text(); if (uld != localStorage.getItem("locale")) { - Materialize.toast(lang_setting_ul[lang].replace("{{set}}" ,ult), 3000); + Materialize.toast(lang.lang_setting_ul.replace("{{set}}" ,ult), 3000); } localStorage.setItem("locale", uld); var ntd = $("[name=notf]:checked").val(); var ntt = $("[for=ntf_"+ntd+"]").text(); if (ntd != localStorage.getItem("nativenotf")) { - Materialize.toast(lang_setting_notf[lang].replace("{{set}}" ,ntt), 3000); + Materialize.toast(lang.lang_setting_notf.replace("{{set}}" ,ntt), 3000); } localStorage.setItem("nativenotf", ntd); var qtd = $("[name=quote]:checked").val(); var qtt = $("[for=q_"+qtd+"]").text(); if (qtd != localStorage.getItem("quote")) { - Materialize.toast(lang_setting_quote[lang].replace("{{set}}" ,qtt), 3000); + Materialize.toast(lang.lang_setting_quote.replace("{{set}}" ,qtt), 3000); } localStorage.setItem("quote", qtd); var viad = $("[name=via]:checked").val(); var viat = $("[for=via_"+viad+"]").text(); if (viad != localStorage.getItem("viashow")) { - Materialize.toast(lang_setting_via[lang].replace("{{set}}" ,viat), 3000); + Materialize.toast(lang.lang_setting_via.replace("{{set}}" ,viat), 3000); } localStorage.setItem("viashow", viad); var notfmd = $("[name=notfm]:checked").val(); var notfmt = $("[for=notfm_"+notfmd+"]").text(); if (notfmd != localStorage.getItem("setasread")) { - Materialize.toast(lang_setting_setasread[lang].replace("{{set}}" ,notfmt), 3000); + Materialize.toast(lang.lang_setting_setasread.replace("{{set}}" ,notfmt), 3000); } localStorage.setItem("setasread", notfmd); var movd = $("[name=mov]:checked").val(); var movt = $("[for=mov_"+movd+"]").text(); if (movd != localStorage.getItem("mouseover")) { - Materialize.toast(lang_setting_mov[lang].replace("{{set}}" ,movt), 3000); + Materialize.toast(lang.lang_setting_mov.replace("{{set}}" ,movt), 3000); } localStorage.setItem("mouseover", movd); var maind = $("[name=main]:checked").val(); var maint = $("[for=mn_"+maind+"]").text(); if (maind != localStorage.getItem("mainuse")) { - Materialize.toast(lang_setting_main[lang].replace("{{set}}" ,maint), 3000); + Materialize.toast(lang.lang_setting_main.replace("{{set}}" ,maint), 3000); } localStorage.setItem("mainuse", maind); var secd = $("[name=sec]:checked").val(); var sect = $("[for=sec-"+secd+"]").text(); if (secd != localStorage.getItem("sec")) { - Materialize.toast(lang_setting_sec[lang].replace("{{set}}" ,sect), 3000); + Materialize.toast(lang.lang_setting_sec.replace("{{set}}" ,sect), 3000); } localStorage.setItem("sec", secd); } @@ -424,10 +424,10 @@ function climute(){ var cli = localStorage.getItem("client_mute"); var obj = JSON.parse(cli); if(!obj){ - $("#mute-cli").html(lang_setting_nomuting[lang]); + $("#mute-cli").html(lang.lang_setting_nomuting); }else{ if(!obj[0]){ - $("#mute-cli").html(lang_setting_nomuting[lang]); + $("#mute-cli").html(lang.lang_setting_nomuting); return; } var templete; @@ -437,7 +437,7 @@ function climute(){ templete = '
' + list + '.' + cli + '
'; + key + ')">'+lang.lang_del+'
'; $("#mute-cli").append(templete); }); } @@ -481,20 +481,20 @@ function notftest(){ var ipc = electron.ipcRenderer; var os = electron.remote.process.platform; var options = { - body: lang_setting_notftest[lang]+'('+lang_setting_notftestprof[lang]+')', + body: lang.lang_setting_notftest+'('+lang.lang_setting_notftestprof+')', icon: localStorage.getItem("prof_0") }; if(os=="darwin"){ - var n = new Notification('TheDesk'+lang_setting_notftest[lang], options); + var n = new Notification('TheDesk'+lang.lang_setting_notftest, options); }else{ - ipc.send('native-notf', ['TheDesk'+lang_setting_notftest[lang],lang_setting_notftest[lang]+'('+lang_setting_notftestprof[lang]+')',localStorage.getItem('prof_0'),"",""]); + ipc.send('native-notf', ['TheDesk'+lang.lang_setting_notftest,lang.lang_setting_notftest+'('+lang.lang_setting_notftestprof+')',localStorage.getItem('prof_0'),"",""]); } } function oks(no){ var txt=$("#oks-"+no).val(); localStorage.setItem("oks-"+no, txt); - Materialize.toast(lang_setting_ksref[lang], 3000); + Materialize.toast(lang.lang_setting_ksref, 3000); } function oksload(){ if(localStorage.getItem("oks-1")){$("#oks-1").val(localStorage.getItem("oks-1"))} @@ -510,7 +510,7 @@ function changelang(lang){ }); } function exportSettings(){ - if(!confirm(lang_setting_exportwarn[lang])){ + if(!confirm(lang.lang_setting_exportwarn)){ return false; } var electron = require("electron"); @@ -584,7 +584,7 @@ function exportSettings(){ }); } function importSettings(){ - if(!confirm(lang_setting_importwarn[lang])){ + if(!confirm(lang.lang_setting_importwarn)){ return false; } var electron = require("electron"); diff --git a/app/js/ui/spotify.js b/app/js/ui/spotify.js index e7460eee..dd70b14f 100644 --- a/app/js/ui/spotify.js +++ b/app/js/ui/spotify.js @@ -57,10 +57,10 @@ function spotifyFlagSave(){ var awk = $("[name=awk]:checked").val(); if(awk=="yes"){ localStorage.setItem("artwork","yes"); - Materialize.toast(lang_spotify_img[lang], 3000); + Materialize.toast(lang.lang_spotify_img, 3000); }else{ localStorage.removeItem("artwork"); - Materialize.toast(lang_spotify_imgno[lang], 3000); + Materialize.toast(lang.lang_spotify_imgno, 3000); } } function nowplaying(mode){ @@ -118,7 +118,7 @@ function nowplaying(mode){ $("#textarea").val(content); }); }else{ - alert(lang_spotify_acct[lang]); + alert(lang.lang_spotify_acct); } }else if(mode=="itunes"){ var electron = require("electron"); @@ -158,7 +158,7 @@ function nowplaying(mode){ function spotifySave(){ var temp=$("#np-temp").val(); localStorage.setItem("np-temp", temp); - Materialize.toast(lang_spotify_np[lang], 3000); + Materialize.toast(lang.lang_spotify_np, 3000); } if(location.search){ var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/); diff --git a/app/js/ui/tips.js b/app/js/ui/tips.js index f960e1ba..a1d735be 100644 --- a/app/js/ui/tips.js +++ b/app/js/ui/tips.js @@ -142,7 +142,7 @@ function spotifytips(){ spotint=setInterval(spotStart, 1000); }); }else{ - alert(lang_spotify_acct[lang]); + alert(lang.lang_spotify_acct); } } function spotStart(){ diff --git a/app/js/userdata/his-data.js b/app/js/userdata/his-data.js index 356ff7ac..67ddfe04 100644 --- a/app/js/userdata/his-data.js +++ b/app/js/userdata/his-data.js @@ -53,7 +53,7 @@ function utl(user, more, acct_id) { var templete = parse(json, '', acct_id, 'user'); } if(!json[0]){ - templete=lang_details_nodata[lang]+"
"; + templete=lang.lang_details_nodata+"
"; } if (more) { $("#his-tl-contents").append(templete); @@ -155,7 +155,7 @@ function flw(user, more, acct_id) { var templete = userparse(json,'',acct_id); } if(templete==""){ - templete=lang_details_nodata[lang]+"
"; + templete=lang.lang_details_nodata+"
"; } if (more) { $("#his-follow-list-contents").append(templete); @@ -221,7 +221,7 @@ function fer(user, more, acct_id) { var templete = userparse(json,'',acct_id); } if(templete==""){ - templete=lang_details_nodata[lang]+"
"; + templete=lang.lang_details_nodata+"
"; } if (more) { $("#his-follower-list-contents").append(templete); @@ -283,7 +283,7 @@ function showFav(more, acct_id) { var templete = misskeyParse(json, '', acct_id,'user'); } if(!json[0]){ - templete=lang_details_nodata[lang]+"
"; + templete=lang.lang_details_nodata+"
"; } if (more) { $("#his-fav-list-contents").append(templete); @@ -339,7 +339,7 @@ function showMut(more, acct_id) { console.error(error); }).then(function(json) { if(!json[0]){ - templete=lang_details_nodata[lang]+"
"; + templete=lang.lang_details_nodata+"
"; } var templete = userparse(json,'',acct_id); if (more) { @@ -358,7 +358,7 @@ function showBlo(more, acct_id) { } var domain = localStorage.getItem("domain_" + acct_id); if(localStorage.getItem("mode_" + domain)=="misskey"){ - $("#his-blocking-list-contents").html(lang_hisdata_notonmisskey[lang]+"
"); + $("#his-blocking-list-contents").html(lang.lang_hisdata_notonmisskey+"
"); return false; } var at = localStorage.getItem("acct_"+ acct_id + "_at"); @@ -382,7 +382,7 @@ function showBlo(more, acct_id) { console.error(error); }).then(function(json) { if(!json[0]){ - templete=lang_details_nodata[lang]+"
"; + templete=lang.lang_details_nodata+"
"; } var templete = userparse(json,'',acct_id); if (more) { @@ -445,7 +445,7 @@ function showReq(more, acct_id) { } if(!json[0]){ - templete=lang_details_nodata[lang]+"
"; + templete=lang.lang_details_nodata+"
"; } if (more) { $("#his-request-list-contents").append(templete); @@ -463,7 +463,7 @@ function showDom(more, acct_id) { } var domain = localStorage.getItem("domain_" + acct_id); if(localStorage.getItem("mode_" + domain)=="misskey"){ - $("#his-domain-list-contents").html(lang_hisdata_notonmisskey[lang]+"
"); + $("#his-domain-list-contents").html(lang.lang_hisdata_notonmisskey+"
"); return false; } var at = localStorage.getItem("acct_"+ acct_id + "_at"); @@ -489,7 +489,7 @@ function showDom(more, acct_id) { }).then(function(json) { var templete = ""; if(!json[0]){ - templete=lang_details_nodata[lang]+"
"; + templete=lang.lang_details_nodata+"
"; } Object.keys(json).forEach(function(key) { var domain = json[key]; @@ -514,7 +514,7 @@ function showFrl(more, acct_id) { } var domain = localStorage.getItem("domain_" + acct_id); if(localStorage.getItem("mode_" + domain)=="misskey"){ - $("#his-follow-recom-contents").html(lang_hisdata_notonmisskey[lang]+"
"); + $("#his-follow-recom-contents").html(lang.lang_hisdata_notonmisskey+"
"); return false; } var at = localStorage.getItem("acct_"+ acct_id + "_at"); @@ -534,13 +534,13 @@ function showFrl(more, acct_id) { }).then(function(response) { return response.json(); }).catch(function(error) { - $("#his-follow-recom-contents").html(lang_details_nodata[lang]+"("+lang_hisdata_frcreq[lang]+")
"); + $("#his-follow-recom-contents").html(lang.lang_details_nodata+"("+lang.lang_hisdata_frcreq+")
"); console.error(error); }).then(function(json) { console.log(json); if(!json[0]){ console.log("No data"); - templete=lang_details_nodata[lang]+"("+lang_hisdata_frcwarn[lang]+")
"; + templete=lang.lang_details_nodata+"("+lang.lang_hisdata_frcwarn+")
"; }else{ var templete = userparse(json,'',acct_id); } @@ -557,7 +557,7 @@ function showFrl(more, acct_id) { //ユーザーマッチングリスト function showMat() { - $("#his-matching-list-contents").html(lang_hisdata_taketime[lang]); + $("#his-matching-list-contents").html(lang.lang_hisdata_taketime); var full=$("#his-acct").attr("fullname"); var acct_id=$("#his-data").attr("use-acct"); full=full.split("@"); diff --git a/app/js/userdata/showOnTL.js b/app/js/userdata/showOnTL.js index d4044a47..e073b679 100644 --- a/app/js/userdata/showOnTL.js +++ b/app/js/userdata/showOnTL.js @@ -86,8 +86,8 @@ function udg(user, acct_id) { //moved設定時 if (json.moved) { Materialize.toast( - lang_showontl_movetxt[lang]+'', 4000) + lang.lang_showontl_movetxt+'', 4000) } $('#his-data').modal('open'); $('#his-data').attr("user-id", user); @@ -151,7 +151,7 @@ function udg(user, acct_id) { $("#his-des").html(twemoji.parse(note)); } if(json.bot){ - $("#his-bot").html(lang_showontl_botacct[lang]); + $("#his-bot").html(lang.lang_showontl_botacct); } $('#his-data').css('background-size', 'cover'); $("#his-data .tab-content").css("height",$("#his-float-timeline").height()-70+"px") @@ -288,21 +288,21 @@ function misskeyUdg(user, acct_id) { if (json.isFollowing) { //自分がフォローしている $("#his-data").addClass("following"); - $("#his-follow-btn").text(lang_status_unfollow[lang]); + $("#his-follow-btn").text(lang.lang_status_unfollow); hisList(user,acct_id); }else{ - $("#his-follow-btn").text(lang_status_follow[lang]); + $("#his-follow-btn").text(lang.lang_status_follow); } if (json.isFollowed) { //フォローされてる - $("#his-relation").text(lang_showontl_followed[lang]); + $("#his-relation").text(lang.lang_showontl_followed); } $("#his-block-btn").hide(); if (json.isMuted) { $("#his-data").addClass("muting"); - $("#his-mute-btn").text(lang_status_unmute[lang]); + $("#his-mute-btn").text(lang.lang_status_unmute); }else{ - $("#his-mute-btn").text(lang_status_mute[lang]); + $("#his-mute-btn").text(lang.lang_status_mute); } $(".only-my-data").hide(); $(".only-his-data").show(); @@ -347,46 +347,46 @@ function relations(user, acct_id) { if (json.following) { //自分がフォローしている $("#his-data").addClass("following"); - $("#his-follow-btn").text(lang_status_unfollow[lang]); + $("#his-follow-btn").text(lang.lang_status_unfollow); hisList(user,acct_id); }else{ - $("#his-follow-btn").text(lang_status_follow[lang]); + $("#his-follow-btn").text(lang.lang_status_follow); } if (json.followed_by) { //フォローされてる - $("#his-relation").text(lang_showontl_followed[lang]); + $("#his-relation").text(lang.lang_showontl_followed); } if (json.blocking) { $("#his-data").addClass("blocking"); - $("#his-block-btn").text(lang_status_unblock[lang]); + $("#his-block-btn").text(lang.lang_status_unblock); }else{ - $("#his-block-btn").text(lang_status_block[lang]); + $("#his-block-btn").text(lang.lang_status_block); } if (json.muting) { $("#his-data").addClass("muting"); - $("#his-mute-btn").text(lang_status_unmute[lang]); + $("#his-mute-btn").text(lang.lang_status_unmute); }else{ - $("#his-mute-btn").text(lang_status_mute[lang]); + $("#his-mute-btn").text(lang.lang_status_mute); } if (json.muting_notifications) { $("#his-data").addClass("mutingNotf"); - $("#his-notf-btn").text(lang_showontl_notf[lang]+lang_status_unmute[lang]); + $("#his-notf-btn").text(lang.lang_showontl_notf+lang.lang_status_unmute); }else{ - $("#his-notf-btn").text(lang_showontl_notf[lang]+lang_status_mute[lang]); + $("#his-notf-btn").text(lang.lang_showontl_notf+lang.lang_status_mute); } if (json.domain_blocking) { $("#his-data").addClass("blockingDom"); - $("#his-domain-btn").text(lang_showontl_domain[lang]+lang_status_unblock[lang]); + $("#his-domain-btn").text(lang.lang_showontl_domain+lang.lang_status_unblock); }else{ - $("#his-domain-btn").text(lang_showontl_domain[lang]+lang_status_block[lang]); + $("#his-domain-btn").text(lang.lang_showontl_domain+lang.lang_status_block); } //Endorsed if(json.endorsed){ $("#his-end-btn").addClass("endorsed"); - $("#his-end-btn").text(lang_status_unendorse[lang]) + $("#his-end-btn").text(lang.lang_status_unendorse) }else{ $("#his-end-btn").removeClass("endorsed"); - $("#his-end-btn").text(lang_status_endorse[lang]) + $("#his-end-btn").text(lang.lang_status_endorse) } }); @@ -431,15 +431,15 @@ function reset(){ $("#his-notf-btn").show(); $("#his-domain-btn").show(); $("#his-emp-btn").show(); - $("#his-follow-btn").text(lang_status_follow[lang]); - $("#his-mute-btn").text(lang_status_mute[lang]); - $("#his-block-btn").text(lang_status_block[lang]); - $("#his-notf-btn").text(lang_showontl_notf[lang]+lang_status_mute[lang]); - $("#his-domain-btn").text(lang_showontl_domain[lang]+lang_status_block[lang]); + $("#his-follow-btn").text(lang.lang_status_follow); + $("#his-mute-btn").text(lang.lang_status_mute); + $("#his-block-btn").text(lang.lang_status_block); + $("#his-notf-btn").text(lang.lang_showontl_notf+lang.lang_status_mute); + $("#his-domain-btn").text(lang.lang_showontl_domain+lang.lang_status_block); $("#his-relation").text(""); $(".cont-series").html(""); $("#domainblock").val(""); - $("#his-lists-a").html(lang_showontl_listwarn[lang]); + $("#his-lists-a").html(lang.lang_showontl_listwarn); $("#his-lists-b").html(''); $("#his-name-val").val(""); $("#his-des-val").val(""); diff --git a/app/view/en/acct.html b/app/view/en/acct.html index f968b539..e600b118 100644 --- a/app/view/en/acct.html +++ b/app/view/en/acct.html @@ -25,9 +25,8 @@ body,html{overflow-y: scroll;} - + diff --git a/app/view/en/index.html b/app/view/en/index.html index 0c9bb711..003c43c7 100644 --- a/app/view/en/index.html +++ b/app/view/en/index.html @@ -18,15 +18,14 @@ - - + @@ -836,4 +834,4 @@ var lang="en"; - + \ No newline at end of file diff --git a/app/view/en/setting.html b/app/view/en/setting.html index 74aee191..1f769877 100644 --- a/app/view/en/setting.html +++ b/app/view/en/setting.html @@ -14,8 +14,7 @@ - - +

Preferences

  • @@ -91,7 +90,7 @@ - + @@ -158,8 +157,8 @@
    Auto folding
    TheDesk does not collapse totes of 5 characters or less. Also, when collapsing, newlines are not shown. TheDesk count only newlines as the number of lines.
    - linesaboveor - lettersabove + lines above or + letters above
    Height of images @@ -188,8 +187,8 @@
    Alert before posting a long toot.
    Show dialog whether you make too-long text hidden.
    - linesaboveor - lettersabove + lines above or + letters above
    Always CW set
    diff --git a/app/view/en/update.html b/app/view/en/update.html index e1212327..5d647a46 100644 --- a/app/view/en/update.html +++ b/app/view/en/update.html @@ -72,7 +72,7 @@ a,button,input,label,i{
    Options:
    -
    +

    diff --git a/app/view/ja/acct.html b/app/view/ja/acct.html index fec16073..b174b0de 100644 --- a/app/view/ja/acct.html +++ b/app/view/ja/acct.html @@ -25,9 +25,8 @@ body,html{overflow-y: scroll;} - + diff --git a/app/view/ja/index.html b/app/view/ja/index.html index b3449312..ad02480d 100644 --- a/app/view/ja/index.html +++ b/app/view/ja/index.html @@ -18,15 +18,14 @@ - - + @@ -836,4 +834,4 @@ var lang="ja"; - + \ No newline at end of file diff --git a/app/view/ja/setting.html b/app/view/ja/setting.html index 148f7fa3..eb909b7e 100644 --- a/app/view/ja/setting.html +++ b/app/view/ja/setting.html @@ -14,8 +14,7 @@ - - +

    設定

    • @@ -158,8 +157,8 @@
      指定行数以上を折りたたむ
      5文字以下のトゥートは折りたたみません。また、折りたたみ時は改行が描画されません。改行のみを行数とカウントします。
      - 行以上または - 文字以上 + 行 以上 または + 文字 以上
      画像の高さ @@ -188,8 +187,8 @@
      長文投稿時に警告
      下で指定した以上のトゥートを投稿するときにCWするかのダイアログを表示します。
      - 行以上または - 文字以上 + 行 以上 または + 文字 以上
      標準でCWを設定
      diff --git a/app/view/make/acct.sample.html b/app/view/make/acct.sample.html index 862d7575..0b228ad3 100644 --- a/app/view/make/acct.sample.html +++ b/app/view/make/acct.sample.html @@ -25,9 +25,8 @@ body,html{overflow-y: scroll;} - + diff --git a/app/view/make/index.sample.html b/app/view/make/index.sample.html index f7625f89..4fe8b2a2 100644 --- a/app/view/make/index.sample.html +++ b/app/view/make/index.sample.html @@ -18,8 +18,7 @@ - - + @@ -34,7 +33,6 @@ var ver="Miria (17.0.1)"; var winstore=false; var acct_id=0; var tlid=0; -var lang="{{lang}}"; verck(ver,winstore); diff --git a/app/view/make/setting.sample.html b/app/view/make/setting.sample.html index acd6952a..7231b23d 100644 --- a/app/view/make/setting.sample.html +++ b/app/view/make/setting.sample.html @@ -14,8 +14,7 @@ - - +

      {{setting}}

      • @@ -158,8 +157,8 @@
        {{autofold}}
        {{autofoldwarn}}
        - {{lines}}{{above}}{{or}} - {{letters}}{{above}} + {{lines}} {{above}} {{or}} + {{letters}} {{above}}
        {{imgheight}} @@ -188,8 +187,8 @@
        {{autocw}}
        {{autocwwarn}}
        - {{lines}}{{above}}{{or}} - {{letters}}{{above}} + {{lines}} {{above}} {{or}} + {{letters}} {{above}}
        {{cws}}