From 3a36bdd47454de431ac2c601b292eb5fb9c43ac3 Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Fri, 19 Jun 2020 14:31:30 +0200 Subject: [PATCH] i18n: move the scripts to the top-level 'i18n' directory Also add a README.md to python3-flightgear explaining how to use the PYTHONPATH environment variable or a .pth file in order to run the Python scripts in FGMeta, and pointing to the top-level directories 'catalog' and 'i18n'. --- .../README-l10n.txt => i18n/README.txt | 0 .../fg-convert-translation-files | 0 ...g-copy-weather-scenarios-to-default-locale | 0 .../fg-merge-xliff-into-xliff | 0 .../fg-new-translations | 0 .../fg-update-translation-files | 0 python3-flightgear/README.md | 48 +++++++++++++++++++ 7 files changed, 48 insertions(+) rename python3-flightgear/README-l10n.txt => i18n/README.txt (100%) rename {python3-flightgear => i18n}/fg-convert-translation-files (100%) rename {python3-flightgear => i18n}/fg-copy-weather-scenarios-to-default-locale (100%) rename {python3-flightgear => i18n}/fg-merge-xliff-into-xliff (100%) rename {python3-flightgear => i18n}/fg-new-translations (100%) rename {python3-flightgear => i18n}/fg-update-translation-files (100%) create mode 100644 python3-flightgear/README.md diff --git a/python3-flightgear/README-l10n.txt b/i18n/README.txt similarity index 100% rename from python3-flightgear/README-l10n.txt rename to i18n/README.txt diff --git a/python3-flightgear/fg-convert-translation-files b/i18n/fg-convert-translation-files similarity index 100% rename from python3-flightgear/fg-convert-translation-files rename to i18n/fg-convert-translation-files diff --git a/python3-flightgear/fg-copy-weather-scenarios-to-default-locale b/i18n/fg-copy-weather-scenarios-to-default-locale similarity index 100% rename from python3-flightgear/fg-copy-weather-scenarios-to-default-locale rename to i18n/fg-copy-weather-scenarios-to-default-locale diff --git a/python3-flightgear/fg-merge-xliff-into-xliff b/i18n/fg-merge-xliff-into-xliff similarity index 100% rename from python3-flightgear/fg-merge-xliff-into-xliff rename to i18n/fg-merge-xliff-into-xliff diff --git a/python3-flightgear/fg-new-translations b/i18n/fg-new-translations similarity index 100% rename from python3-flightgear/fg-new-translations rename to i18n/fg-new-translations diff --git a/python3-flightgear/fg-update-translation-files b/i18n/fg-update-translation-files similarity index 100% rename from python3-flightgear/fg-update-translation-files rename to i18n/fg-update-translation-files diff --git a/python3-flightgear/README.md b/python3-flightgear/README.md new file mode 100644 index 0000000..eaed871 --- /dev/null +++ b/python3-flightgear/README.md @@ -0,0 +1,48 @@ +Python code for FlightGear “meta” work +====================================== + +The `flightgear` directory contains FlightGear-specific Python 3 modules. +These modules are mostly of interest to FlightGear developers. + + +Telling your Python interpreter how to access the modules +--------------------------------------------------------- + +In order to run most of the Python scripts in FGMeta, your Python 3 +installation must have the `/path/to/fgmeta/python3-flightgear` directory in +its `sys.path`. One way to do this is to use something like the following in +your shell setup: + + export PYTHONPATH="/path/to/fgmeta/python3-flightgear" + +This example uses Bourne-style syntax; adjust for your particular shell. +Several directories may be added this way using a colon separator on Unix, and +presumably a semicolon on Windows. + +An alternative to setting `PYTHONPATH` is to add .pth files in special +directories of your Python installation(s). For instance, you can create a +file, say, `FlightGear-FGMeta.pth`, containing a single line (with no space at +the beginning): + + /path/to/fgmeta/python3-flightgear + +If you want the modules present in `/path/to/fgmeta/python3-flightgear` to be +accessible to a particular Python interpreter (say, a Python 3.8), simply put +the `.pth` file in `/path/to/python-install-dir/lib/python3.8/site-packages/`. +This can even be a virtual environment if you want. For the system Python +interpreters on Debian, you can put the `.pth` file in, e.g, +`/usr/local/lib/python3.8/dist-packages/`. Note that you may add more lines to +a `.pth` file in case you want to add other paths to the Python interpreter's +`sys.path`. + + +The scripts +----------- + +Once you've done the above setup, the Python 3 scripts in FGMeta should run +fine. This concerns in particular scripts located in the following top-level +directories of FGMeta: + + catalog Generation of aircraft catalogs + i18n Management of translations in FlightGear (i18n stands for + “internationalization”)