Metadata-Version: 2.1
Name: msg2po
Version: 1.3.2
Summary: A set of helper tools to convert Fallout 1/2 MSG and WeiDU TRA into GNU gettext PO and back.
Home-page: https://github.com/BGforgeNet/msg2po
Keywords: Fallout,Fallout 2,Baldur's Gate,Infinity Engine,WeiDU
Author: BGforge
Author-email: dev@bgforge.net
Requires-Python: >=3.8
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: configparser (>=5.2.0)
Requires-Dist: natsort (>=6.2.1,<7)
Requires-Dist: polib (>=1.1.1)
Requires-Dist: python-dateutil (>=2.8.2)
Requires-Dist: ruamel.yaml (>=0.17.21)
Requires-Dist: setuptools (>=59.6.0)
Project-URL: Repository, https://github.com/BGforgeNet/msg2po
Description-Content-Type: text/markdown

# MSG2PO

[![Build status](https://github.com/BGforgeNet/msg2po/workflows/release/badge.svg)](https://github.com/BGforgeNet/msg2po/actions?query=workflow%3Arelease)
[![Patreon](https://img.shields.io/badge/Patreon-donate-FF424D?logo=Patreon&labelColor=141518)](https://www.patreon.com/BGforge)
[![Telegram](https://img.shields.io/badge/telegram-join%20%20%20%20%E2%9D%B1%E2%9D%B1%E2%9D%B1-darkorange?logo=telegram)](https://t.me/bgforge)
[![Discord](https://img.shields.io/discord/420268540700917760?logo=discord&label=discord&color=blue&logoColor=FEE75C)](https://discord.gg/4Yqfggm)
[![IRC](https://img.shields.io/badge/%23IRC-join%20%20%20%20%E2%9D%B1%E2%9D%B1%E2%9D%B1-darkorange)](https://bgforge.net/irc)

This is a set of tools to convert Fallout 1/2 MSG and WeiDU TRA into GNU gettext PO and back, used in [BGforge Hive](https://hive.bgforge.net/). Ask questions [here](https://forums.bgforge.net/viewforum.php?f=9).

### Installation

```bash
pip install msg2po
```

Also install [Gettext tools](https://www.gnu.org/software/gettext/), and make sure they are in PATH.

### Poify

```bash
$ poify.py -h
.bgforge.yml not found, assuming defaults
usage: poify.py [-h] [-e ENC] [DIR]

Poify files in selected directory

positional arguments:
  DIR         source language directory (default: ./english)

options:
  -h, --help  show this help message and exit
  -e ENC      source encoding (default: cp1252)
```

### Action

Github [action](docs/action.md) is available for automatic processing.

---

[Changelog](docs/changelog.md)

### Unfuzzy

Unfuzzy removes fuzzy flag and previous msgid from PO entries, if after all replacements current msgid and previous msgid match exactly. Usually it is run after spelling changes in source language, to reduce diff noise and avoid extra review burden.

The comparison is case sensitive. The replacements are read from `unfuzzy.yml` in current directory, example:

```yaml
- ["Nuka Cola", "Nuka-Cola"]
- ["nuka cola", "Nuka-Cola"]
```

Run

```bash
unfuzzy.py -w data/text/po/french.po
```

