Compare commits

6 Commits

Author SHA1 Message Date
deadvey
3fab094545 Made some small changes 2026-03-03 20:39:40 +00:00
Nullifier
9be261d415 Japanese locale typo fixed 2026-01-18 09:41:50 +00:00
Nullifier
9398919711 Japanese Locale - By Nullifier 2026-01-17 21:49:42 +00:00
545a848479 Stupid spelling error 2026-01-17 14:52:30 +00:00
54ffac931d Added english Australian, apparently there's no differences with GB and
AU
2026-01-17 12:11:04 +00:00
18b842e48c Merge pull request 'add(locale): sv-SE' (#3) from pickzelle/blogger-nodejs:master into master
Reviewed-on: deadvey/blogger-nodejs#3
2026-01-16 23:23:52 +01:00
9 changed files with 104 additions and 18 deletions

44
locales/en-AU.json Normal file
View File

@@ -0,0 +1,44 @@
{
"quotes": "“”‘’",
"password": "Password",
"username": "Username",
"prettyname": "Prettyname",
"description": "Description (social links, what you write about etc), supports markdown",
"title": "Title",
"post_content": "Post Content, supports markdown",
"tags": "Tags (comma seperated)",
"delete_account_confirmation": "Delete my account - (I agree that my account and all of my posts will be permanently deleted instantly)",
"signup_agreement": "I agree to not post illegal or hateful content",
"comment": "Comment",
"submit": "Submit",
"site_ran_by": "Site is ran by",
"signups_unavailable": "Sorry, this server does not allow signups",
"user_exists": "Sorry, this user already exists, try a different username",
"user_doesnt_exist": "Sorry, this user does not exist",
"comment_doesnt_exist": "This comment doesn't exist, this could be because the post it was attached to was deleted",
"post_doesnt_exist": "This post doesn't exist or was deleted",
"incorrect_password": "Incorrect Password",
"rss_disabled": "Sorry, RSS is disabled",
"atom_disabled": "Sorry, ATOM is disabled",
"AI_consent": "The content on this website may not be copied, scraped, or used to train AI models or large language models (LLMs) without prior written consent.",
"rss_feed": "RSS Feed",
"atom_feed": "ATOM Feed",
"no_tags": "No Tags",
"new_post": "New Post",
"edit_post": "Edit Post",
"sign_up": "Sign Up",
"edit_account": "Edit Account",
"permalink": "Permalink",
"written_by": "Written by",
"published": "Published",
"last_modified": "Last Modified",
"hitcount": "Hitcount",
"posts_tagged": "Posts Tagged",
"home_page": "Home Page",
"site_index": "Site Index",
"reply": "reply",
"attribution": "Powered by blogger-nodejs: <a href='https://git.javalsai.tuxcord.net/deadvey/blogger-nodejs'>Source Code</a>, <a href='https://git.javalsai.tuxcord.net/deadvey/blogger-nodejs/raw/branch/master/LICENSE'>license (WTFPL)</a>",
"translated_by": "DeaDvey"
}

View File

@@ -10,7 +10,7 @@
"delete_account_confirmation": "Delete my account - (I agree that my account and all of my posts will be permanently deleted instantly)", "delete_account_confirmation": "Delete my account - (I agree that my account and all of my posts will be permanently deleted instantly)",
"signup_agreement": "I agree to not post illegal or hateful content", "signup_agreement": "I agree to not post illegal or hateful content",
"comment": "Comment", "comment": "Comment",
"submit": "Sumbit", "submit": "Submit",
"site_ran_by": "Site is ran by", "site_ran_by": "Site is ran by",
"signups_unavailable": "Sorry, this server does not allow signups", "signups_unavailable": "Sorry, this server does not allow signups",

View File

@@ -10,7 +10,7 @@
"delete_account_confirmation": "Delete my account - (I agree that my account and all of my posts will be permanently deleted instantly)", "delete_account_confirmation": "Delete my account - (I agree that my account and all of my posts will be permanently deleted instantly)",
"signup_agreement": "I agree to not post illegal or hateful content", "signup_agreement": "I agree to not post illegal or hateful content",
"comment": "Comment", "comment": "Comment",
"submit": "Sumbit", "submit": "Submit",
"site_ran_by": "Site is ran by", "site_ran_by": "Site is ran by",
"signups_unavailable": "Sorry, this server does not allow signups", "signups_unavailable": "Sorry, this server does not allow signups",

44
locales/ja_JP.json Normal file
View File

@@ -0,0 +1,44 @@
{
"quotes": "“”‘’",
"password": "パスワード",
"username": "ユーザー名",
"prettyname": "きれいな名前",
"description": "説明 (例えばSNSのリンクや何を書くなど)、 マークダウンをスポートする",
"title": "題名",
"post_content": "投稿の内容、マークダウンをスポートする",
"tags": "タグ (カンマで区切られています)",
"delete_account_confirmation": "アカウントを削除する - (アカウントと投稿の全部をいつまでも削除するに賛成します。)",
"signup_agreement": "違法なコンテントと憎らしいコンテントをポストしないに賛成します。",
"comment": "コメント",
"submit": "提出する",
"site_ran_by": "アドミン:",
"signups_unavailable": "申し訳ございませんでもこのサーバーはサインアップ",
"user_exists": "申し訳ございませんでもこのユーザー名をつかえります。別のユーザー名を入ります。",
"user_doesnt_exist": "申し訳ございませんでもこのアカウントがいません。",
"comment_doesnt_exist": "このコメントがない、これから投稿を削除したかもしれない",
"post_doesnt_exist": "この投稿がないか又は削除しました。",
"incorrect_password": "パスワードが違う",
"rss_disabled": "申し訳ございませんでもRSSが使用不可能なります。",
"atom_disabled": "申し訳ございませんでもATOMが使用不可能なります。",
"AI_consent": "書面による同意がないとこのホームページの内容はコピーするか又はスクレイピングするか又はAIモデルか大規模言語モデルLLM)を仕込むことが禁断します。",
"rss_feed": "RSSのフィード",
"atom_feed": "ATOMのフィード",
"no_tags": "タグがない",
"new_post": "新しい投稿",
"edit_post": "投稿をエディットする",
"sign_up": "サインアップ",
"edit_account": "アカウントをエディットする",
"permalink": "恒久リンク",
"written_by": "作家は",
"published": "発行の日付",
"last_modified": "全変更",
"hitcount": "ヒット数",
"posts_tagged": "投稿をタグするの数",
"home_page": "ホーム",
"site_index": "ホームページの索引",
"reply": "返事",
"attribution": "blogger-nodejsで作成されています: <a href='https://git.javalsai.tuxcord.net/deadvey/blogger-nodejs'>ソースコード</a>, <a href='https://git.javalsai.tuxcord.net/deadvey/blogger-nodejs/raw/branch/master/LICENSE'>ライセンス (WTFPL)</a>",
"translated_by": "Nullifier"
}

View File

@@ -52,4 +52,10 @@
// Comma seperated list of people who contributed to this translation // Comma seperated list of people who contributed to this translation
"translated_by": "DeaDvey" "translated_by": "DeaDvey"
// TODO
// indexes locales
// Password again
// site_admin?
// Should colons be part of the translations?
} }

View File

@@ -10,7 +10,7 @@
"express": "^5.2.1", "express": "^5.2.1",
"express-router": "^0.0.1", "express-router": "^0.0.1",
"markdown-it": "^14.1.0", "markdown-it": "^14.1.0",
"mysql": "^2.18.1", "mssql": "^12.2.0",
"package.json": "^2.0.1" "package.json": "^2.0.1"
} }
} }

View File

@@ -59,6 +59,7 @@ export function unix_time_to_atom_date(unix_time)
// returns: string // returns: string
export function render_tags(tags) export function render_tags(tags)
{ {
tags = tags.filter((item, index) => tags.indexOf(item) === index) // Remove duplicate tags
let string = "" // Initialises the string let string = "" // Initialises the string
if (tags.length == 1 && tags[0] == "") if (tags.length == 1 && tags[0] == "")
{ {
@@ -135,6 +136,7 @@ export function render_md(content)
typographer: true, typographer: true,
quotes: locale.quotes, quotes: locale.quotes,
}) })
.disable('image');
return md.render(content) return md.render(content)
}; };

View File

@@ -10,13 +10,6 @@
<header id='page-header'> <header id='page-header'>
<%- include('../headers/timeline'); %> <%- include('../headers/timeline'); %>
</header> </header>
<form method="POST" action="/submit_nothing" style="display:none">
<!-- Form is used to help mitigate spam as it is the first form on the front page -->
<input type="hidden" name="post_index" value="0">
<input placeholder="username" name="name"><br/>
<textarea placeholder="comment" name="content"></textarea><br/>
<button type="submit">Submit</button>
</form>
<div id="posts"> <div id="posts">
<% for (let index = posts.length - 1; index >= 0; index--) { %> <% for (let index = posts.length - 1; index >= 0; index--) { %>
<% if (posts[index]["deleted"] != true) { %> <% if (posts[index]["deleted"] != true) { %>
@@ -24,13 +17,6 @@
<% } %> <% } %>
<% } %> <% } %>
</div> </div>
<form method="POST" action="/submit_nothing" style="display:none">
<!-- Form is used to help mitigate spam as it is the last form on the front page -->
<input type="hidden" name="post_index" value="0">
<input placeholder="username" name="name"><br/>
<textarea placeholder="comment" name="content"></textarea><br/>
<button type="submit">Submit</button>
</form>
<footer id='footer'> <footer id='footer'>
<%- include('../partials/footer'); %> <%- include('../partials/footer'); %>
</footer> </footer>

View File

@@ -18,6 +18,10 @@
<i><a href="/user/<%= user.username %>"><%= user.prettyname %></a></i> <i><a href="/user/<%= user.username %>"><%= user.prettyname %></a></i>
</span> </span>
- -
<a if='edit-account-link' href="<%= config.edit_account_base_url %>/<%= user.id %>">
<img class='icon' src='/icons/edit.png' alt='<%= locale.edit_account %>' title='<%= locale.edit_account %>'>
</a>
-
<span id="post-pubdate"> <span id="post-pubdate">
<i><%= func.unix_time_to_date_format(post.pubdate) %></i><br/> <i><%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</span> </span>