Date modifiers adapter

From TNG_Wiki
Jump to navigation Jump to search
Restricted Downloads of Date modifiers adapter are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account Restricted
Caution If you have trouble downloading with Google Chrome, Vivaldi, Brave or other Chromium based browser, try using a right-click and select Open in new Window, then F5, or use another browser such as Firefox Caution


Ambox notice.png The latest version of this mod uses the guidelines for TNG v12+ cust_text.php files. If you are using TNGv12+, and any cust_text.php file in this mod is marked with a Bad Target error, you need to update your cust_text.php files before you can install this mod. [Show instructions]

If you upgraded to TNGv12+, and did not update your cust_text.php files as instructed in the upgrade readme script, then you must use the TNG Mod Manager to update them. To do so:

  1. Go to Mod Manager, and select its "Recommended Updates" tab.
    (If the "Recommended Updates" tab is not visible, then go to the Mod Manager Options tab, select "Display Settings", and turn on the "Recommended Updates" tab.)
  2. Click the "Update" button in the "Recommended Updates" tab.
    Installed mods do not interfere with the update, and if you already have (or think you may have) run this update, it will not hurt for you to run it again.

[See details in the TNGv12 Change Impacts Article][Hide the instructions]

TNG All


Date modifiers adapter
Summary Improves the translation of the date modifiers in French and other languages
Validation
Mod Updated 28 Jan 2023
Download link Date_modifiers_adapter_v13.1.2.1a.zip
TNG 15.0
TNG 14.0
TNG 13.1.2
Download stats
Author(s) Jean-Luc Halleux
MichelK
Homepage Date modifiers adapter (this page)
Mod Support TNG Community Forums
Contact Developer jlh-tng@internetofficer.io
Latest Mod v13.1.2.1a
Min TNG V 13.1.2
Max TNG V 14
Files modified
globallib.php
languages/French-UTF8/cust_text.php
languages/French/cust_text.php
languages/FrenchQC-UTF8/cust_text.php
Related Mods
Notes

Purpose of the Mod

The Mod was initially designed to improve the translation of the date modifiers (FROM, BEF, AFT,...) in French.

TNG alltext.php only allows one translation for each date modifier. This is not good enough for the French language.

Ce Mod corrige les modifieurs de dates (BEF, AFT,...) pour la langue française. En français, les modifieurs devant un jour sont différents des modifieurs devant un mois ou une année.

The mod can be used with any language where modifiers before a day are different from modifiers before a month or year. (see Other languages)

Case TNG translation Mod Translation
FROM 20 Jan 2023 TO 25 Jan 2023 du 20 janvier 2023 au 25 janvier 2023 du 20 janvier 2023 au 25 janvier 2023
FROM Jan 2022 TO Mar 2023 du janvier 2022 au mars 2023 de janvier 2022 à mars 2023
FROM 31 May 2022 TO 2023 du 31 mai 2022 au 2023 du 31 mai 2022 à 2023
FROM Mar 2023 du mars 2023 à partir de mars 2023

Development

Author : Jean-Luc Halleux

Requirements

TNG v13.1.2 or newer

IMPORTANT : Before installing

Before installing, it is best to make a backup copy of the files that will be modified by this mod.

TNG Modules Impacted

You can click on the [Expand] link on the right to display the list of TNG Modules change and the [Collapse] link to hide this section again.

The following TNG Modules are modified, and should be backed up prior to installing this mod:

globallib.php
languages/French-UTF8/cust_text.php
languages/French/cust_text.php
languages/FrenchQC-UTF8/cust_text.php

INSTALLATION

  • Unzip the received file directly in the "mods" sub directory of your TNG installation.
  • Via Mod Manager, install the Mod.

Upgrade

When upgrading to a newer version

  • Uninstall and eventually Delete the current Mod.
  • Proceed as for an installation with the new Mod.

Other languages

This Mod can handle other language if needed. Just provide the translation for these strings :

$sf_dates['BET_MY'] = "entre";
$sf_dates['BET_D'] = "entre le";
$sf_dates['AND_MY'] = "et";
$sf_dates['AND_D'] = "et le";
$sf_dates['FROM_MY'] = "de";
$sf_dates['FROM_D'] = "du";
$sf_dates['TO_MY'] = "à";
$sf_dates['TO_D'] = "au";
$sf_dates['FROM_MY_NOTO'] = "à partir de";
$sf_dates['FROM_D_NOTO'] = "à partir du";
$sf_dates['TO_MY_NOFROM'] = "jusqu'à";
$sf_dates['TO_D_NOFROM'] = "jusqu'au";
$sf_dates['BEF_MY'] = "avant";
$sf_dates['BEF_D'] = "avant le";
$sf_dates['AFT_MY'] = "après";
$sf_dates['AFT_D'] = "après le";
$sf_dates['ABT_MY'] = "vers";
$sf_dates['ABT_D'] = "vers le";
$sf_dates['EST'] = "(estimé)";
$sf_dates['CALC'] = "(calculé)";

Visualization

Some dates modified by the Mod.

Example

Known Problems

None at this day...

In the event of a problem

  • Try using the Mod Manager Remove capability
  • Copy the backup of the affected files back to your TNG directory
  • If the problem persists, open an issue in the TNG Community Forums or on the page of Jean-Luc Halleux.

Historic of modifications

Version Release Date Contents
13.1.2.1a 28 Jan 2023 Corrects an issue with FROM and replaces "depuis" by "à partir de" and "depuis le" by "à partir du"
13.1.2.1 11 Jan 2023 First online version.

Sites using this mod

If you download and install this mod, please add your TNG site to the table below:
If you have any problem to do it, send me a mail...

URL User Note Mod-Version TNG-Version User-language
Ô mes aieux! Halleux, Paygnard et autres Jean-Luc Halleux Mod's Developper 13.1.2.1a
TNG 15.0.1
FR/EN/NL/PT/ES
Racines luxo-hennuyeres Michel Kirsch Thx Jean-Luc. Nice addition ! 13.1.2.1 14.0 FR/EN/NL/GE/SP
La saga BIGEY François bigey public 13.1.2.1 14.0 FR
GénéaKat Katryne public/private 13​.1​.2​.1a
TNG 15.0.1
FR,EN,SP