Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build back Babel #1508

Merged
merged 10 commits into from
Aug 4, 2022
Merged

Build back Babel #1508

merged 10 commits into from
Aug 4, 2022

Conversation

alerque
Copy link
Member

@alerque alerque commented Aug 4, 2022

This is cherry picks from #1474 with some rehashing to:

  • Not include messages we don't utilize yet, providing ones people may use is something I want to think on more.
  • Prefix messages with their module scope.
  • More idiomatic Fluent usage, especially no term reuse with no context.

Also:

  • Adds support for SILE commands in FTL messages via XML syntax.

@alerque alerque added this to the v0.14.0 milestone Aug 4, 2022
@alerque
Copy link
Member Author

alerque commented Aug 4, 2022

Important to address before merging: point 6 from original PR. The Fluent messages need to fall back to something, probably the und local for messages that don't exist.

alerque added 3 commits August 4, 2022 13:16
…intenence

To resort:

    for ftl in i18n/*.ftl; do
        cat $ftl |
            sed '/^$/d' |
            sort |
            awk '1;NF{print ""}' |
            sed -e '$d' |
            sponge $ftl
    done
i18n/ar.ftl Outdated Show resolved Hide resolved
@alerque alerque force-pushed the build-back-babel branch 2 times, most recently from 0314e33 to d288e8b Compare August 4, 2022 13:36
@alerque alerque marked this pull request as ready for review August 4, 2022 15:05
@alerque alerque requested review from a team and simoncozens as code owners August 4, 2022 15:05
Omikhleia and others added 6 commits August 4, 2022 21:34
(Cherry picked from 556103e but content mixed with later commits from
rebased i18n-for-all branch.)

For fetching a key from the rebased source  branch:

    function copykey () {
        sed -i -e "/^$1 = /d" *.ftl
        for ftl in *.ftl; do
            rg "^$1 =" ../i18n-for-all/i18n/$ftl >> $ftl
        done
    }
BREAKING CHANGE: The primary use was probably internal to SILE, but if
by chance you have bibtex databases with formatting commands in SIL
markup format rather than just plain text content the markup will cease
to function and will need to be converted to XML syntax instead.

This enables the use of declarative markup in Fluent localizations.
@alerque alerque merged commit 2279fa9 into sile-typesetter:master Aug 4, 2022
@alerque alerque deleted the build-back-babel branch August 4, 2022 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants