Browse Source

Add for developers

main
HackerNCoder 3 months ago
parent
commit
113d26a75e
  1. 5
      TODO.md
  2. 4
      content/contents+en.lr
  3. 4
      content/contents+fr.lr
  4. 3
      content/developer/contents.lr
  5. 15
      content/developer/renpy/contents.lr
  6. 11
      models/about.ini
  7. 9
      models/developer.ini
  8. 21
      models/developer_obj.ini
  9. 25
      templates/developer.html
  10. 0
      templates/developer_obj.html
  11. 4
      templates/footer.html
  12. 4
      templates/header.html
  13. 4
      templates/layout.html
  14. 4
      templates/meta.html

5
TODO.md

@ -0,0 +1,5 @@
Navbar is transparent when not scrolled, doesn't work on pages that are white
Auto projects left-right, should be doable, just keep an i and if /2: right
Header should change based on page. E.g: Don't show "Join us" and "Projects" if not on index, make for devs marked when on that page

4
content/contents+en.lr

@ -8,4 +8,6 @@ about_title: Join us!
---
about_body:
The Queerscriptor community does it's translations on a [weblate](https://littleroot.net/weblate/). Currently we do our coordination in a channel on the [Next Gaymer](https://nextgaymer.com/) Discord.
The Queerscriptor community does it's translations on a [weblate](https://littleroot.net/weblate/). We do our coordination in a channel on the [Next Gaymer](https://nextgaymer.com/) Discord.
---
meta_desc: A community of people that translate queer games

4
content/contents+fr.lr

@ -8,4 +8,6 @@ about_title: Join us!
---
about_body:
The Queerscriptor community does it's translations on a [weblate](https://littleroot.net/weblate/). Currently we do our coordination in a channel on the [Next Gaymer](https://nextgaymer.com/) Discord.
The Queerscriptor community does it's translations on a [weblate](https://littleroot.net/weblate/). We do our coordination in a channel on the [Next Gaymer](https://nextgaymer.com/) Discord.
---
meta_desc: A community of people that translate queer games

3
content/developer/contents.lr

@ -0,0 +1,3 @@
_model: developer
---
_discoverable: no

15
content/developer/renpy/contents.lr

@ -0,0 +1,15 @@
sort_key: 0
---
title: Extracting, converting, translating and reconverting Ren'Py games
---
body:
TODO: Add stuff about how to translate Ren'Py games
You need three tools: Ren'Py SDK, rpatool.py (or any other program that can unarchive rpa) and renpy-ttk
Ren'Py games use an archive.rpa, wherein most of the game actually is. I don't believe it is nessecarry to extract the game to make translations, but that's what I do anyways. Here I use rpatool.py. See it's documentation on how to use it.
Once that is done, run renpy-ttk and generate a pot file. Once it is done, the pot file is uploaded to weblate. If there already are translations (finished or not), it may be a good idea to use renpy-ttk to get the po files for them, and upload them to weblate. For new translations, if you have a common.rpy translation, use Ren'Py SDK to generate the translation, then replace the common and then generate a po file that can be uploaded to weblate, this saves the translators time.
To update the translations from weblate. Download the po file, run renpy-ttk and use the sensible option. That should be it. Note the caveat with renpy-ttk: *something something, don't extract after update?*

11
models/about.ini

@ -1,11 +0,0 @@
[model]
name = About.html model
label = About
hidden = yes
protected = yes
[fields.title]
type = string
[fields.body]
type = markdown

9
models/developer.ini

@ -0,0 +1,9 @@
[model]
name = Developer page
label = Developer
hidden = yes
protected = yes
[children]
model = developer_obj
order_by = sort_key

21
models/developer_obj.ini

@ -0,0 +1,21 @@
[model]
name = Developer object
label = {{ this.name }}
_discoverable = no
[attachment]
order_by = _id
[fields.sort_key]
label = Sort order
type = sort_key
[fields.title]
label = Title
type = string
translate = True
[fields.body]
label = Body
type = markdown
translate = True

25
templates/developer.html

@ -0,0 +1,25 @@
{% extends "layout.html" %}
{% block page %}
{% set objs = site.query('/developer').include_undiscoverable(true).all() %}
<!-- Projects-->
<section class="projects-section bg-light" id="projects">
<div class="container px-4 px-lg-5">
{% for obj in objs %}
{% set image = obj.attachments.images.first() %}
<!-- Project One Row-->
<div class="row gx-0 mb-5 mb-lg-0 justify-content-end">
<div class="col-lg-6">
<div class="bg-black text-center h-100 project">
<div class="d-flex h-100">
<div class="project-text w-100 my-auto text-center text-lg-left text-white">
<h4>{{ obj.title }}</h4>
{{ obj.body }}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</section>
{% endblock %}

0
templates/developer_obj.html

4
templates/footer.html

@ -9,8 +9,8 @@
<!-- Footer-->
<footer class="footer bg-black small text-center text-white-50"><div class="container px-4 px-lg-5">Copyright &copy; Queerscriptors 2021</div></footer>
<!-- Bootstrap core JS-->
<script src="{{ 'js/bootstrap.bundle.min.js'|url }}"></script>
<script src="{{ '/js/bootstrap.bundle.min.js'|url }}"></script>
<!-- Core theme JS-->
<script src="{{ 'js/scripts.js'|url }}"></script>
<script src="{{ '/js/scripts.js'|url }}"></script>
</body>
</html>

4
templates/header.html

@ -1,4 +1,4 @@
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<nav class="navbar navbar-expand-lg {{ "navbar-light" }} fixed-top" id="mainNav">
<div class="container px-4 px-lg-5">
<a class="navbar-brand" href="#page-top">{{ _("Queerscriptors") }}</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
@ -9,7 +9,7 @@
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link" href="#join">{{ _("Join us") }}</a></li>
<li class="nav-item"><a class="nav-link" href="#projects">{{ _("Projects") }}</a></li>
<!-- <li class="nav-item"><a class="nav-link" href="#signup">{{ _("Contact" ) }}</a></li>-->
<li class="nav-item"><a class="nav-link" href="/developer">{{ _("For developers" ) }}</a></li>
</ul>
</div>
</div>

4
templates/layout.html

@ -1,6 +1,8 @@
{% include 'meta.html' %}
{% include 'header.html' %}
{% include 'header.html' %}
{% block page %}
{% include 'masterhead.html' %}
{% include 'about.html' %}
{% block projects %}{% endblock %}
{% endblock %}
{% include 'footer.html' %}

4
templates/meta.html

@ -7,11 +7,11 @@
<title>{{ this.title }}</title>
<!--<link rel="icon" type="image/x-icon" href="{{ '/images/favicon.ico'|url }}" />-->
<!-- Font Awesome icons (free version)-->
<script src="{{ 'js/fontawesome.js'|url }}"></script>
<script src="{{ '/js/fontawesome.js'|url }}"></script>
<!-- Google fonts-->
<link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="{{ 'css/styles.css'|url }}" rel="stylesheet" />
<link href="{{ '/css/styles.css'|url }}" rel="stylesheet" />
</head>
<body id="page-top">

Loading…
Cancel
Save