Added locale (english only at the moment) and modifed the EJS so I think

every string is customisable (via the /locales/selected locale)
This commit is contained in:
2025-08-09 16:57:31 +01:00
parent 8418318d80
commit 6fc1f85e18
17 changed files with 187 additions and 80 deletions

View File

@@ -1 +1,5 @@
<a href="/">Home Page</a><br/>
<a href="/"><%= locale.home_page %></a>
<a href="/index/pages"><%= locale.site_index %></a>
<a href="<%= config.new_post_url %>"><%= locale.new_post %></a>
<br/>
<%- config.seperator %>

View File

@@ -1,4 +1,4 @@
<h1>
Post's tagged "<%- tag %>":
<%= locale.posts_tagged %>: "<%- tag %>"
</h1>
<%- config.seperator %>

View File

@@ -4,11 +4,17 @@
<h2>
<%- config.site_description %>
</h2>
<a href="/rss">RSS Feed</a><br/>
<a href="/atom">ATOM Feed</a><br/>
<a href="<%= config.new_post_url %>">New post</a><br/>
<a href="<%= config.signup_url %>">Sign Up</a><br/>
<% if (config.rss == true) { %>
<a href="/rss"><%= locale.rss_feed %></a><br/>
<% } %>
<% if (config.atom == true) { %>
<a href="/atom"><%= locale.atom_feed %></a><br/>
<% } %>
<a href="<%= config.new_post_url %>"><%= locale.new_post %></a><br/>
<% if (config.allow_signup == true) { %>
<a href="<%= config.signup_url %>"><%= locale.sign_up %></a><br/>
<% } %>
<% if (config.enable_hitcount == true) { %>
Hitcount: <%= hitcount %>
<%= locale.hitcount %>: <%= hitcount %>
<% } %>
<%- config.seperator %>

View File

@@ -1,8 +1,8 @@
<h1>
<%= user.prettyname %>'s posts
<%= user.prettyname %>
</h1>
<p><%- converter.makeHtml(user.description) %></p>
<a href="<%= config.edit_account_base_url %>/<%= userID %>">edit account</a><br/>
<a href="/user/<%= user.username %>/rss">RSS</a><br/>
<a href="/user/<%= user.username %>/atom">ATOM</a>
<a href="<%= config.edit_account_base_url %>/<%= userID %>"><%= locale.edit_account %></a><br/>
<a href="/user/<%= user.username %>/rss"><%= locale.rss_feed %></a><br/>
<a href="/user/<%= user.username %>/atom"><%= locale.atom_feed %></a>
<%- config.seperator %>