i18n markdown on Weblate for qt project (.ts) - internationalization

I maintain a Qt5 project, for which i18n .ts files are translated thanks to Weblate.
The project has markdown user-documentation and I'd like to manage its translation using Weblate too.
Is there a way to generate .ts files out of .md? (And then generate translated .md on build?)
Otherwise, is there an other way to handle user-documentation i18n with Qt5?

You need to have translations in some of formats supported by Weblate. You can use po4a to extract text formats into Gettext PO for use in Weblate..

Related

I needed to convert 3D .vox files to .glb format and .glb to .vox

I had a use case in which I need to convert .vox files to .glb and vice-versa. Is there any packages available that I could integrate in my backend application.
Found libraries like three.js and assimp. Although they include various formats but .vox isn't included.

Getting asciidoc to generate slides with embedded latex

I am interested in generating slides using asciidoc markup. Thus far I have been able to generate some slides using asciidoc tool by passing the flag -b slidy to the asciidoc executable as given here: https://www.methods.co.nz/asciidoc/slidy.html#(3)
However, when I try to embed Latex expressions like $\alpha + \beta$ it just gets rendered as is. I know there is a tool called asciidoctor-latex which can be used for generating "normal" HTML pages / PDF files containing the Latex symbols
but when I tried -b slidy flag with asciidoctor-latex I get the error
asciidoctor: FAILED: missing converter for backend 'slidy'. Processing aborted. (RuntimeError)
Use --trace for backtrace
How should I go about installing the necessary slidy backend?
As far as I am aware there is a backend for slidy included in the asciidoc program (python) distribution, but currently there is no such backend for asciidoctor (the ruby implementation of AsciiDoc).
You can generate LaTeX with asciidoc (python) LaTeX Backend, but that probably won't help with embedding formulas in slidy. I guess it is easier to write a preprocessor script that replaces your LaTeX-Code with an svg-image (external reference to a file generated by eg. dvisvgm).

Is there a common convention for template extensions when using Nunjucks?

When working with Nunjucks templates which requite rendering or compilation is there a standard naming convention to be used to have them processed? i.e. file.nunjucks, file.nunjucks.html, or file.njs etc.
I know that when working with other template languages it's common to use their name as the extension such as file.liquid, file.ejs, etc, but I've not seen much in reference to Nunjucks.
I personally prefer the extension '.njk', its also something that they have as an example on the Nunjucks docs.
File Extensions
Although you are free to use any file extension you wish for your Nunjucks template files, the Nunjucks community has adopted .njk.
If you are developing tools or editor syntax helpers for Nunjucks, please include recognition of the .njk extension.
Jon Buckley's nunjucks plugin for
wintersmith supports template naming convention
*.html
*.nunjucks
See https://github.com/jbuck/wintersmith-nunjucks/issues/8 for proof
So this naming convention is common everywhere wintersmith site generator is used. Especially the *.html seems to be fairly common also elsewhere.
Nunjucks's own documentation uses the *.html in examples of using {% include ..%} and {% extends ..%} tags and it says
...overview of the templating features available in nunjucks. Nunjucks is essentially a port of jinja2, so you can read their docs if you find anything lacking here...
and jinja's own documentation in turn says
...A template is simply a text file. It can generate any text-based format (HTML, XML, CSV, LaTeX, etc.). It doesn’t have a specific extension, .html or .xml are just fine...
My in-house site generator applies the nunjucks preprocessor also to files with extensions: *.md, *.markdown, *.htm, *.html, *.php, *.css, *.js, .htaccess but it can not be considered "common convention".
It might be possible to find out nunjuck's usage statistics and examples of used naming conventions using Google or GitHub or Wolfram Alpha computational knowledge engine or IBM Watson Analytics service...
I think that you can use any naming convention as long as you are able to refactor (rename) it anytime later

SCSS: using my own custom frameworks - File path and including webfonts

I have created my own set of custom SCSS frameworks that I want to use between projects.
This video shows how to do this. However, I am having some problems:
1) The Path to your custom SCSS framework has to be absolute
According to the video, the path to your frame work must be absolute (e.g. load "/Users/USERNAME/ frameworks/MYFRAMEWORK"). Is there a way to make this relative, so if I change machines the framework reference will still be correct?
2) In my custom framework, I have included some webfonts. When the stylesheet is complied, the paths to these fonts is wrong. Is there a way to make the fonts included in my project?
In the end, I used Codekit for this: http://incident57.com/codekit/
It's really easy. Just have a folder on a computer that contains your framework and then set it as a Codekit framework.
You can then use the import command from any SCSS file to import files from the framework.
You can even have a javascript/jquery file framework.
This is easily the best tool for Web Development. I can't imagine development without it.

Generating RDoc to LaTeX

Is it possible to generate RDoc in LaTeX format? I looked at RDoc and YARD, but didn't find what I need.
I am writing a documentation in LaTeX for my project in Ruby, and I need a way to easily embed the API reference, as an appendix or as a chapter, in the final PDF. The most convenient, for me, would be to generate LaTeX source from Ruby source files and include it where appropriate.
I have no experience with it, but a short google-search shows:
https://github.com/Quintus/rdoc_pdf-latex (link broken, see below)
http://www.ruby-doc.org/core-1.9/classes/RDoc/Markup/ToLaTeX.html (link broken)
Another possibility:
DO you know the listings-package in LaTeX? There is also a ruby support.
You would get no rdoc-commands, but maybe you could make LaTeX-commands in your code?
Papyrus is a plugin for RDoc that enables RDoc to generate PDF files. It's based on LaTeX. So there should be a intermediate TeX-file.
From the readme.rdoc of the github repository for papyrus:
This library is a plugin for Ruby’s documentation generator RDoc. It provides both a generator for outputting PDF (Portable document format) (the RDoc::Generator::Papyrus class) files and a formatter for turning the parsed RDoc markup into LaTeX code (RDoc::Markup::ToLaTeX; RDoc::Markup::ToLaTeX_Crossref adds cross-reference facilities).

Resources