File: README

package info (click to toggle)
frescobaldi 3.3.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 24,212 kB
  • sloc: python: 39,014; javascript: 263; sh: 238; makefile: 80
file content (130 lines) | stat: -rw-r--r-- 3,443 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
The built-in Frescobaldi manual
===============================

This manual consists of simple markdown-like formatted text files, one per
help topic.

When writing a help page about "Something", make a file "someting.md" in this
"userguide" directory.

Write a title and the body content. E.g.:

    === This is the title ===

    This is the body, that explains the feature Something.

If the userguide page has subpages, list them under #SUBDOCS:

    #SUBDOCS
    something_bla
    something_other
    
You can add pages to the "See also" section:

    #SEEALSO
    other_page

The text pages support basic markdown-like features. Paragraphs should be
separated with blank lines. A paragraph can also be a list:

    * item list
    * another item
      1. nested numbered list
          
         a paragraph in the same nested level

    A description item
    : explanation of the description.

Headings use 1 to 3 = signs:

    == Sub-title ==

Code examples should start and end with ``` on the start of a line:

    ```lilypond
    % A LilyPond-formatted music block
    \relative c' {
      c d e f g
    }
    ```

Inline markdown: *emphasized*, [http://url link text], `code`.

Inline markup (a heading,paragraph or list item) is translated before being
rendered to HTML.

If you don't want to translate a paragraph (e.g. because is it a list of names,
or a technical description that should not be translated), you should start
the paragraph with an exclamation sign "!".

If you *do* want to translated *some parts* of an untranslated paragraph, you
should wrap that part(s) in "_(" and ")_". E.g.:

    !`-dno-point-and-click`: _(No point and click)_

It is also possible to embed variables in the text. Those always adhere to the
python format string syntax.

In the markdown help page you could write:

    See {link}.
    
The {link} construct is put unchanged in the translatable string, the
translators know that those are not meant to be translated.

The value is looked up as follows:

1. Look in the #VARS section below the document content (see below)

2. Call the corresponding function in userguide/resolve.py


The #VARS section
==================

Here you can list variables that are referred to in the translatable markdown
text blocks. Each variable is on one line:

    name type content ...

e.g. when using:

    See {link}.

    #VARS
    link url http://www.frescobaldi.org/
    
"See {link}." will be transformed like:
    
    _("See {link}.").format(
        link='<a href="http://www.frescobaldi.org/">www.frescobaldi.org</a>')

These are the available types:

type:   text:

md          inline markdown-like text (is not translated)

html        html text

text        plain text, HTML tags will be escaped

url         url, will be made clickable

help        name, will make a link to the help page with that name

shortcut    collection action   (will show the currently set keyboard shortcut)

menu        name -> name -> etc

            Will return a nicely formatted menu path, like File->Import->Etc.
            There are predefined names like file, edit, view etc, but you can
            also use the exact names, they *will* be translated.

image       filename, will make the image visible

languagename    code, will return the full name of the language in the current
            language. E.g. languagename nl will return 'Dutch' when the current
            UI language is English.