Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/veelo/gettext into main
Browse files Browse the repository at this point in the history
  • Loading branch information
veelo committed Sep 1, 2023
2 parents e18340e + 9864247 commit 6833dd8
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ This Gettext package removes the need for an external parser and provides a more

## Dub configuration

Add the following to your `dub.json` (or its SDLang equivalent to your `dub.sdl`):
Add the following to your `dub.json`:

<details open>

<summary>dub.json</summary>

```json
"targetType": "executable",
Expand Down Expand Up @@ -95,6 +99,39 @@ Add the following to your `dub.json` (or its SDLang equivalent to your `dub.sdl`
}
]
```

</details>

or its equvialent `dub.sdl`:

<details>

<summary>dub.sdl</summary>

```sdl
dependency "gettext" version="~>1"
configuration "default" {
targetType "library"
}
configuration "i18n" {
targetType "library"
copyFiles "mo"
preGenerateCommands \
"dub run --config=xgettext" \
"dub run gettext:merge -- --popath=po --backup=none" \
"dub run gettext:po2mo -- --popath=po --mopath=mo"
}
configuration "xgettext" {
targetType "library"
targetPath ".xgettext"
subConfiguration "gettext" "xgettext"
versions "xgettext"
}
```

</details>

This may seem quite the boiler plate, but it automates many steps without taking away your control over them. We'll discuss these further below.

## Module import
Expand Down

0 comments on commit 6833dd8

Please sign in to comment.