0
0

Merge pull request #2412 from syuilo/develop

update
This commit is contained in:
syuilo 2018-08-23 03:23:31 +09:00 committed by GitHub
commit fca7a9da94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 565 additions and 692 deletions

View File

@ -58,7 +58,7 @@ common:
friday: "金曜日"
saturday: "土曜日"
reactions:
like: "いいね"
like: "ええやん"
love: "しゅき"
laugh: "笑"
hmm: "ふぅ~む"

View File

@ -58,7 +58,7 @@ common:
friday: "金曜日"
saturday: "土曜日"
reactions:
like: "Gefällt mir"
like: "ええやん"
love: "Lieben"
laugh: "Lachen"
hmm: "Hmm...?"

View File

@ -58,7 +58,7 @@ common:
friday: "Viernes"
saturday: "Sábado"
reactions:
like: "me gusta"
like: "ええやん"
love: "amor"
laugh: "risa"
hmm: "hmm"

View File

@ -30,7 +30,7 @@ common:
quoted-by: "Cité·e par {} :"
time:
unknown: "inconnu"
future: "future"
future: "à l'instant"
just_now: "à l'instant"
seconds_ago: "Il y a {} seconde·s"
minutes_ago: "Il y a {} minute·s"
@ -58,7 +58,7 @@ common:
friday: "Vendredi"
saturday: "Samedi"
reactions:
like: "Aime"
like: "ええやん"
love: "Adore"
laugh: "Rire"
hmm: "Hmm ... ?"
@ -287,7 +287,7 @@ common/views/components/signin.vue:
signin: "Se connecter"
or: "Ou"
signin-with-twitter: "Se connecter via Twitter"
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
login-failed: "Échec d'authentification. Veuillez vérifier que votre nom d'utilisateur et mot de passe sont corrects."
common/views/components/signup.vue:
invitation-code: "Code dinvitation"
invitation-info: "Si vous navez pas de code dinvitation, contactez un·e <a href=\"{}\">administrateur·rice</a>."
@ -443,7 +443,7 @@ desktop/views/components/drive-window.vue:
desktop/views/components/drive.file.vue:
avatar: "Avatar"
banner: "Bannière"
nsfw: "閲覧注意"
nsfw: "CW"
contextmenu:
rename: "Renommer"
mark-as-sensitive: "Marquer comme sensible"
@ -638,7 +638,7 @@ desktop/views/components/settings.vue:
show-maps-desc: "位置情報が添付された投稿のマップを自動的に展開します。"
sound: "Son"
enable-sounds: "Activer le son"
enable-sounds-desc: "投稿やメッセージを送受信したときなどにサウンドを再生します。この設定はブラウザに記憶されます。"
enable-sounds-desc: "Jouer un son lorsque vous recevez un message. Ce paramètre est sauvegardé dans le navigateur."
volume: "Volume"
test: "Test"
mobile: "Mobile"
@ -699,7 +699,7 @@ desktop/views/components/settings.2fa.vue:
desktop/views/components/settings.api.vue:
intro: "APIを利用するには、上記のトークンを「i」というキーでパラメータに付加してリクエストします。"
caution: "アカウントを不正利用される可能性があるため、このトークンは第三者に教えないでください(アプリなどにも入力しないでください)。"
regeneration-of-token: "万が一このトークンが漏れたりその可能性がある場合はトークンを再生成できます。"
regeneration-of-token: "Si votre jeton est compromis, vous pouvez le régénérer."
regenerate-token: "Regenerer le token"
token: "Jeton :"
enter-password: "Veuillez entrer le mot de passe"

View File

@ -11,13 +11,13 @@ const loadLang = lang => yaml.safeLoad(
const native = loadLang('ja-JP');
const langs = {
'de': loadLang('de'),
'en': loadLang('en'),
'fr': loadLang('fr'),
'ja': native,
'de-DE': loadLang('de-DE'),
'en-US': loadLang('en-US'),
'fr-FR': loadLang('fr-FR'),
'ja-JP': native,
'ja-KS': loadLang('ja-KS'),
'pl': loadLang('pl'),
'es': loadLang('es')
'pl-PL': loadLang('pl-PL'),
'es-ES': loadLang('es-ES')
};
Object.values(langs).forEach(locale => {

View File

@ -58,7 +58,7 @@ common:
friday: "金曜日"
saturday: "土曜日"
reactions:
like: "いいね"
like: "ええやん"
love: "しゅき"
laugh: "笑"
hmm: "ふぅ~む"

View File

@ -857,6 +857,7 @@ desktop/views/components/ui.header.account.vue:
lists: "リスト"
follow-requests: "フォロー申請"
customize: "ホームのカスタマイズ"
admin: "管理"
settings: "設定"
signout: "サインアウト"
dark: "闇に飲まれる"
@ -1214,6 +1215,7 @@ mobile/views/components/ui.nav.vue:
game: "ゲーム"
darkmode: "ダークモード"
settings: "設定"
admin: "管理"
about: "Misskeyについて"
mobile/views/components/user-timeline.vue:

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@ common:
friday: "금요일"
saturday: "토요일"
reactions:
like: "좋네"
like: "ええやん"
love: "좋아"
laugh: "크크"
hmm: "음..."

View File

@ -58,7 +58,7 @@ common:
friday: "Piątek"
saturday: "Sobota"
reactions:
like: "Lubię"
like: "ええやん"
love: "Kocham"
laugh: "Śmieszne"
hmm: "Hmm…?"

View File

@ -3,147 +3,147 @@ meta:
lang: "Português"
divider: ""
common:
misskey: "A ⭐ of fediverse"
about-title: "A ⭐ of fediverse."
about: "Misskeyを見つけていただき、ありがとうございます。Misskeyは、地球で生まれた<b>分散マイクロブログSNS</b>です。Fediverse(様々なSNSで構成される宇宙)の中に存在するため、他のSNSと相互に繋がっています。暫し都会の喧騒から離れて、新しいインターネットにダイブしてみませんか。"
misskey: "Uma ⭐ do fediverso"
about-title: "Uma ⭐ do fediverso."
about: "Obrigado por encontrar Misskey. Uma <b>plataforma descentralizada de microblog</b> nascida na Terra. Já que ela existe no Fediverso (um universo onde várias plataformas de mídia social são organizadas), ela é ligada com outras plataformas.Por que você não tira uma folga do agito e confusão da cidade, e mergulha em uma nova internet?"
adblock:
detected: "広告ブロッカーを無効にしてください"
warning: "<strong>Misskeyは広告を掲載していません</strong>が、広告をブロックする機能が有効だと一部の機能が利用できなかったり、不具合が発生する場合があります。"
application-authorization: "アプリの連携"
close: "閉じる"
do-not-copy-paste: "ここにコードを入力したり張り付けたりしないでください。アカウントが不正利用される可能性があります。"
got-it: "わかった"
detected: "Por favor, desative o bloqueador de anúncios."
warning: "Alguns recursos podem não estar disponíveis ou apresentar mal funcionamento se o bloqueio de anúncios estiver ativado. <strong>Misskey não está usando anúncios</strong>"
application-authorization: "Aplicativos autorizados"
close: "Fechar"
do-not-copy-paste: "Por favor, não digite ou copie o código aqui. A conta pode ser comprometida."
got-it: "Entendi!"
customization-tips:
title: "カスタマイズのヒント"
paragraph1: "ホームのカスタマイズでは、ウィジェットを追加/削除したり、ドラッグ&ドロップして並べ替えたりすることができます。"
paragraph2: "一部のウィジェットは、<strong><strong>右</strong>クリック</strong>することで表示を変更することができます。"
paragraph3: "ウィジェットを削除するには、ヘッダーの<strong>「ゴミ箱」</strong>と書かれたエリアにウィジェットをドラッグ&ドロップします。"
paragraph4: "カスタマイズを終了するには、右上の「完了」をクリックします。"
gotit: "Got it!"
title: "Dicas de personalização"
paragraph1: "Personalização da página inicial permite adicionar/remover, arrastar e soltar e reorganizar widgets."
paragraph2: "Você pode mudar a visualização de alguns widgets <strong>clicando com o botão <strong>direito.</strong></strong>"
paragraph3: "Para apagar um widget, o arraste e solte <strong>na área chamada \"Lixo\"</strong> no cabeçalho."
paragraph4: "Para terminar a personalização clique em \"Terminar\" acima e à direita."
gotit: "Entendi!"
notification:
file-uploaded: "ファイルがアップロードされました"
message-from: "{}さんからメッセージ:"
reversi-invited: "対局への招待があります"
reversi-invited-by: "{}さんから"
notified-by: "{}さんから"
reply-from: "{}さんから返信:"
quoted-by: "{}さんが引用:"
file-uploaded: "Arquivo enviado!"
message-from: "Mensagem de {}:"
reversi-invited: "Convidado a jogar"
reversi-invited-by: "Convidado por {}:"
notified-by: "Notificado por {}:"
reply-from: "Resposta de {}:"
quoted-by: "Citado por {}:"
time:
unknown: "なぞのじかん"
future: "未来"
just_now: "たった今"
seconds_ago: "{}秒前"
minutes_ago: "{}分前"
hours_ago: "{}時間前"
days_ago: "{}日前"
weeks_ago: "{}週間前"
months_ago: "{}ヶ月前"
years_ago: "{}年前"
month-and-day: "{month}月 {day}日"
trash: "ゴミ箱"
unknown: "Desconhecido"
future: "futuro"
just_now: "agora"
seconds_ago: "{} sec atrás"
minutes_ago: "{} min atrás"
hours_ago: "{} h atrás"
days_ago: "{} d atrás"
weeks_ago: "{} sem atrás"
months_ago: "{} m atrás"
years_ago: "{} ano(s) atrás"
month-and-day: "{day}/{month}"
trash: "Lixo"
weekday-short:
sunday: ""
monday: ""
tuesday: ""
wednesday: ""
thursday: ""
friday: ""
saturday: ""
sunday: "Dom"
monday: "Seg"
tuesday: "Ter"
wednesday: "Qua"
thursday: "Qui"
friday: "Sex"
saturday: "Seb"
weekday:
sunday: "日曜日"
monday: "月曜日"
tuesday: "火曜日"
wednesday: "水曜日"
thursday: "木曜日"
friday: "金曜日"
saturday: "土曜日"
sunday: "domingo"
monday: "segunda"
tuesday: "terça"
wednesday: "quarta"
thursday: "quinta"
friday: "sexta"
saturday: "sábado"
reactions:
like: "いいね"
love: "しゅき"
laugh: ""
hmm: "ふぅ~む"
surprise: "わお"
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
like: "Legal..."
love: "Amei"
laugh: "Riso"
hmm: "Hmm...?"
surprise: "Uau"
congrats: "Parabéns!"
angry: "Raiva"
confused: "Confuso"
rip: "RIP"
pudding: "Pudding"
pudding: "Pudim"
note-placeholders:
a: "今どうしてる?"
b: "何かありましたか?"
c: "何をお考えですか?"
d: "言いたいことは?"
e: "ここに書いてください"
f: "あなたが書くのを待っています..."
search: "検索"
delete: "削除"
loading: "読み込み中"
ok: "わかった"
update-available-title: "更新があります"
update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。"
a: "O que está fazendo?"
b: "O que está acontecendo?"
c: "No que está pensando?"
d: "Quer postar algo?"
e: "Escreva aqui"
f: "Esperando você escrever."
search: "Buscar"
delete: "Apagar"
loading: "Carregando"
ok: "OK"
update-available-title: "Atualização disponível"
update-available: "Uma nova versão de Misskey está disponível ({newer}). A versão atual é {current}. Recarregue a página para atualizar."
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
verified-user: "公式アカウント"
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
i-like-sushi: "Eu prefiro sushi a pudim"
show-reversi-board-labels: "Mostrar etiquetas de colunas e linhas no Reversi"
verified-user: "Conta verificada"
disable-animated-mfm: "Desativar texto animado nas publicações"
reversi:
drawn: "引き分け"
my-turn: "あなたのターンです"
opponent-turn: "相手のターンです"
turn-of: "{}のターンです"
past-turn-of: "{}のターン"
won: "{}の勝ち"
black: ""
white: ""
total: "合計"
drawn: "Empatado"
my-turn: "Seu turno"
opponent-turn: "Turno do oponente"
turn-of: "turno de {}"
past-turn-of: "turno de {}"
won: "{} venceu"
black: "Pretas"
white: "Brancas"
total: "Total"
this-turn: "{}ターン目"
widgets:
analog-clock: "アナログ時計"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
activity: "アクティビティ"
rss: "RSSリーダー"
memo: "付箋"
analog-clock: "Relógio analógico"
profile: "Perfil"
calendar: "Calendário"
timemachine: "Calendário (máquina do tempo)"
activity: "Atividade"
rss: "Leitor de RSS"
memo: "Nota adesiva"
trends: "トレンド"
photo-stream: "フォトストリーム"
posts-monitor: "投稿チャート"
slideshow: "スライドショー"
version: "バージョン"
version: "Versão"
broadcast: "ブロードキャスト"
notifications: "通知"
users: "おすすめユーザー"
polls: "アンケート"
notifications: "Notificações"
users: "Usuário sugeridos"
polls: "Enquetes"
post-form: "投稿フォーム"
messaging: "メッセージ"
server: "サーバー情報"
donation: "寄付のお願い"
nav: "ナビゲーション"
tips: "ヒント"
hashtags: "ハッシュタグ"
messaging: "Mensagens"
server: "Informações do servidor"
donation: "Doações"
nav: "Navegação"
tips: "Dicas"
hashtags: "Hashtags"
deck:
widgets: "ウィジェット"
home: "ホーム"
local: "ローカル"
hybrid: "ソーシャル"
global: "グローバル"
notifications: "通知"
list: "リスト"
swap-left: "左に移動"
swap-right: "右に移動"
swap-up: "上に移動"
swap-down: "下に移動"
remove: "カラムを削除"
widgets: "Widgets"
home: "Início"
local: "Local"
hybrid: "Social"
global: "Global"
notifications: "Notificações"
list: "Listas"
swap-left: "Mover para a esquerda"
swap-right: "Mover para a direita"
swap-up: "Mover para cima"
swap-down: "Mover para baixo"
remove: "Remover"
add-column: "カラムを追加"
rename: "名前を変更"
rename: "Renomear"
stack-left: "左に重ねる"
pop-right: "右に出す"
auth/views/form.vue:
share-access: "<i>{{ app.name }}</i>があなたのアカウントにアクセスすることを<b>許可</b>しますか?"
permission-ask: "このアプリは次の権限を要求しています:"
account-read: "アカウントの情報を見る。"
account-write: "アカウントの情報を操作する。"
note-write: "投稿する。"
share-access: "Você <b>permite</b> que <i>{{ app.name }}</i> acesse sua conta?"
permission-ask: "Este aplicativo precisa das seguintes permissões:"
account-read: "Ver informações da conta."
account-write: "Modificar informações da conta."
note-write: "Publicar"
like-write: "いいねしたりいいね解除する。"
following-write: "フォローしたりフォロー解除する。"
drive-read: "ドライブを見る。"
@ -193,7 +193,7 @@ common/views/components/games/reversi/reversi.room.vue:
random: "ランダム"
black-or-white: "先手/後手"
black-is: "{}が黒"
rules: "ルール"
rules: "Regras"
is-llotheo: "石の少ない方が勝ち(ロセオ)"
looped-map: "ループマップ"
can-put-everywhere: "どこでも置けるモード"
@ -202,7 +202,7 @@ common/views/components/games/reversi/reversi.room.vue:
waiting-for-other: "相手の準備が完了するのを待っています"
waiting-for-me: "あなたの準備が完了するのを待っています"
waiting-for-both: "準備中"
cancel: "キャンセル"
cancel: "Cancelar"
ready: "準備完了"
cancel-ready: "準備続行"
common/views/components/connect-failed.vue:
@ -779,7 +779,7 @@ desktop/views/components/user-lists-window.vue:
desktop/views/components/user-preview.vue:
notes: "投稿"
following: "フォロー"
followers: "フォロワー"
followers: "Seguidores"
desktop/views/components/users-list.vue:
all: "すべて"
iknow: "知り合い"
@ -793,13 +793,13 @@ desktop/views/components/window.vue:
desktop/views/pages/admin/admin.vue:
dashboard: "ダッシュボード"
drive: "ドライブ"
users: "ユーザー"
update: "更新"
users: "Usuários"
update: "Actualizações"
desktop/views/pages/admin/admin.dashboard.vue:
dashboard: "ダッシュボード"
all-users: "全てのユーザー"
all-users: "Todos os usuários"
original-users: "このインスタンスのユーザー"
all-notes: "全てのノート"
all-notes: "Todas as notas"
original-notes: "このインスタンスのノート"
invite: "招待"
desktop/views/pages/admin/admin.suspend-user.vue:
@ -845,24 +845,24 @@ desktop/views/pages/welcome.vue:
signup: "新規登録"
signin-button: "やってる"
signup-button: "やる"
timeline: "タイムライン"
powered-by-misskey: "Powered by <b>Misskey</b>."
timeline: "Timeline"
powered-by-misskey: "Desenvolvido por <b>Misskey</b>."
desktop/views/pages/drive.vue:
title: "Misskey Drive"
title: "Drive Misskey"
desktop/views/pages/favorites.vue:
more: "さらに読み込む"
more: "Carregar mais"
desktop/views/pages/home-customize.vue:
title: "ホームのカスタマイズ"
title: "Personalizar a página inicial"
desktop/views/pages/note.vue:
prev: "前の投稿"
next: "次の投稿"
prev: "Nota anterior"
next: "Próxima nota"
desktop/views/pages/selectdrive.vue:
title: "ファイルを選択してください"
ok: "決定"
cancel: "キャンセル"
upload: "PCからドライブにファイルをアップロード"
title: "Selecione um arquivo"
ok: "OK"
cancel: "Cancelar"
upload: "Envie arquivos do seu dispositivo"
desktop/views/pages/search.vue:
not-available: "検索機能はインスタンスの設定で無効になっています。"
not-available: "A pesquisa está desligada nas configurações desta instância."
not-found: "「{}」に関する投稿は見つかりませんでした。"
desktop/views/pages/share.vue:
share-with: "{}で共有"
@ -1170,29 +1170,29 @@ mobile/views/pages/user.vue:
timeline: "タイムライン"
media: "メディア"
is-suspended: "このユーザーは凍結されています。"
is-remote: "このユーザーはリモートユーザーです。"
view-remote: "正確な情報を見る"
is-remote: "Este é uma usuário remoto. O perfil que vê aqui pode não estar completo."
view-remote: "Ver o perfil completo."
mobile/views/pages/user/home.vue:
recent-notes: "最近の投稿"
images: "画像"
activity: "アクティビティ"
recent-notes: "Notas recentes"
images: "Imagens"
activity: "Atividade"
keywords: "キーワード"
domains: "頻出ドメイン"
frequently-replied-users: "よく会話するユーザー"
followers-you-know: "知り合いのフォロワー"
last-used-at: "最終ログイン"
followers-you-know: "Seguidores que você conhece"
last-used-at: "Ativo pela última vez:"
mobile/views/pages/user/home.followers-you-know.vue:
loading: "読み込み中"
loading: "Carregando"
no-users: "知り合いのユーザーはいません"
mobile/views/pages/user/home.friends.vue:
loading: "読み込み中"
no-users: "よく会話するユーザーはいません"
mobile/views/pages/user/home.notes.vue:
loading: "読み込み中"
no-notes: "投稿はありません"
loading: "Carregando"
no-notes: "Nenhuma mensagem"
mobile/views/pages/user/home.photos.vue:
loading: "読み込み中"
no-photos: "写真はありません"
loading: "Carregando"
no-photos: "Sem fotos"
docs:
edit-this-page-on-github: "間違いや改善点を見つけましたか?"
edit-this-page-on-github-link: "このページをGitHubで編集"
@ -1209,11 +1209,11 @@ docs:
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
show-src: "このエンドポイントのソースコードも閲覧できます。"
show-src-link: "コードをGitHubで見る"
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
show-src-link: "Veja o código no GitHub"
generated: "Este documento foi gerado pelas definições da API."
props:
name: "名前"
type: ""
description: "説明"
name: "Nome"
type: "Tipo"
description: "Descrição"
dev/views/index.vue:
manage-apps: "アプリの管理"
manage-apps: "Gerenciar aplicativos"

View File

@ -58,7 +58,7 @@ common:
friday: "金曜日"
saturday: "土曜日"
reactions:
like: "いいね"
like: "ええやん"
love: "しゅき"
laugh: "笑"
hmm: "ふぅ~む"

View File

@ -58,7 +58,7 @@ common:
friday: "金曜日"
saturday: "土曜日"
reactions:
like: "いいね"
like: "ええやん"
love: "しゅき"
laugh: "笑"
hmm: "ふぅ~む"

View File

@ -38,12 +38,18 @@
//#endregion
//#region Detect the user language
let lang = navigator.language;
let lang = null;
if (!LANGS.includes(lang)) lang = lang.split('-')[0];
if (LANGS.includes(navigator.language)) {
lang = navigator.language;
} else {
lang = LANGS.find(x => x.split('-')[0] == navigator.language);
// The default language is English
if (!LANGS.includes(lang)) lang = 'en';
if (lang == null) {
// Fallback
lang = 'en-US';
}
}
if (settings) {
if (settings.device.lang) lang = settings.device.lang;

View File

@ -30,10 +30,8 @@
<li @click="settings">
<p>%fa:cog%<span>%i18n:@settings%</span>%fa:angle-right%</p>
</li>
</ul>
<ul>
<li @click="signout">
<p class="signout">%fa:power-off%<span>%i18n:@signout%</span></p>
<li v-if="$store.state.i.isAdmin">
<router-link to="/admin">%fa:terminal%<span>%i18n:@admin%</span>%fa:angle-right%</router-link>
</li>
</ul>
<ul>
@ -41,6 +39,11 @@
<p><span>%i18n:@dark%</span><template v-if="$store.state.device.darkmode">%fa:moon%</template><template v-else>%fa:R moon%</template></p>
</li>
</ul>
<ul>
<li @click="signout">
<p class="signout">%fa:power-off%<span>%i18n:@signout%</span></p>
</li>
</ul>
</div>
</transition>
</div>

View File

@ -11,6 +11,10 @@
<x-cpu-memory :connection="connection"/>
</div>
<div>
<label>
<input type="checkbox" v-model="disableRegistration" @change="updateMeta">
<span>disableRegistration</span>
</label>
<button class="ui" @click="invite">%i18n:@invite%</button>
<p v-if="inviteCode">Code: <code>{{ inviteCode }}</code></p>
</div>
@ -28,6 +32,7 @@ export default Vue.extend({
data() {
return {
stats: null,
disableRegistration: false,
inviteCode: null,
connection: null,
connectionId: null
@ -37,6 +42,10 @@ export default Vue.extend({
this.connection = (this as any).os.streams.serverStatsStream.getConnection();
this.connectionId = (this as any).os.streams.serverStatsStream.use();
(this as any).os.getMeta().then(meta => {
this.disableRegistration = meta.disableRegistration;
});
(this as any).api('stats').then(stats => {
this.stats = stats;
});
@ -49,6 +58,11 @@ export default Vue.extend({
(this as any).api('admin/invite').then(x => {
this.inviteCode = x.code;
});
},
updateMeta() {
(this as any).api('admin/update-meta', {
disableRegistration: this.disableRegistration
});
}
}
});

View File

@ -30,6 +30,7 @@
<ul>
<li><a @click="search">%fa:search%%i18n:@search%%fa:angle-right%</a></li>
<li><router-link to="/i/settings" :data-active="$route.name == 'settings'">%fa:cog%%i18n:@settings%%fa:angle-right%</router-link></li>
<li v-if="$store.getters.isSignedIn && $store.state.i.isAdmin"><router-link to="/admin">%fa:terminal%<span>%i18n:@admin%</span>%fa:angle-right%</router-link></li>
<li @click="dark"><p><template v-if="$store.state.device.darkmode">%fa:moon%</template><template v-else>%fa:R moon%</template><span>%i18n:@darkmode%</span></p></li>
</ul>
</div>

View File

@ -27,10 +27,12 @@ export default class Replacer {
let text = texts;
if (path) {
path = path.replace('.ts', '');
if (text.hasOwnProperty(path)) {
text = text[path];
} else {
if (this.lang === 'ja') console.warn(`path '${path}' not found`);
if (this.lang === 'ja-JP') console.warn(`path '${path}' not found`);
return key; // Fallback
}
}
@ -46,10 +48,10 @@ export default class Replacer {
});
if (error) {
if (this.lang === 'ja') console.warn(`key '${key}' not found in '${path}'`);
if (this.lang === 'ja-JP') console.warn(`key '${key}' not found in '${path}'`);
return key; // Fallback
} else if (typeof text !== 'string') {
if (this.lang === 'ja') console.warn(`key '${key}' is not string in '${path}'`);
if (this.lang === 'ja-JP') console.warn(`key '${key}' is not string in '${path}'`);
return key; // Fallback
} else {
return text;

View File

@ -0,0 +1,37 @@
import $ from 'cafy';
import Meta from '../../../../models/meta';
import getParams from '../../get-params';
export const meta = {
desc: {
ja: 'インスタンスの設定を更新します。'
},
requireCredential: true,
requireAdmin: true,
params: {
disableRegistration: $.bool.optional.nullable.note({
desc: {
ja: '招待制か否か'
}
}),
}
};
export default (params: any) => new Promise(async (res, rej) => {
const [ps, psErr] = getParams(meta, params);
if (psErr) return rej(psErr);
const set = {} as any;
if (ps.disableRegistration === true || ps.disableRegistration === false) {
set.disableRegistration = ps.disableRegistration;
}
await Meta.update({}, {
$set: set
}, { upsert: true });
res();
});