DTLi18n — Reference Manual v1.1-46

Functional reference for the bilingual French/English i18n catalog editor and migration assistant.

versionv1.1-46dateJuly 16, 2026platformWindows, Linux, macOSruntimePython 3.10 or laterinterfaceFrenchlicenseMITsuitewww.netdtl.com

Preface

Purpose

This manual describes what DTLi18n is, why it was created, and what it does. It is a functional and architecture reference. It deliberately contains no menu description, no command reference, and no step-by-step procedure.

DTLi18n browses, edits, and safeguards bilingual French/English localization catalogs, and assists a Python project's i18n compliance: verifying references between code and catalog, cross-checking an already internationalized project and correcting safe inconsistencies, and performing the initial conversion of a project that is not yet internationalized.

Intended audience

This document is intended for developers and maintainers of the NetDTL suite responsible for user-facing text, and for anyone who needs to understand DTLi18n's behavior before integrating it into a project or interpreting its reports.

Design principles

Scope: DTLi18n acts on localization catalogs and on the Python files that reference them. It does not automatically translate text from one language to another: translation remains a human decision, entered in the editor.

Background

Origin of the need

A bilingual catalog maintained by hand drifts over time: keys get renamed or removed on the code side without the catalog following along, key numbers eventually collide, translations stay empty, and it becomes hard to know for certain whether a given key is still used anywhere in a project of any real size.

The problem looks different for a project that has never been internationalized: its user-facing text is hardcoded, mixed in with technical strings (logging, regular expressions, file names) that should not be translated, and converting everything by hand is slow and risks introducing syntax errors or references to keys that do not exist yet.

Problem addressed

DTLi18n was created to cover both halves of this lifecycle with the same safety guarantees: maintaining an existing catalog by keeping it synchronized with the code that uses it, and bootstrapping internationalization for a project that does not yet have it, without ever leaving the project in a state where a reference points to a missing key or the code no longer compiles.

Reference point: every DTLi18n operation that modifies source files ends with an automatic check: valid Python syntax, and every key referenced in the code actually present in the catalog.

Architecture

Overview

DTLi18n is organized around four processing families: direct editing of a catalog, analysis of the references between code and catalog, cross-project audit of an already internationalized project, and the initial conversion of a project that is not. All four share the same backup, preview, and reporting mechanism.

Components

ComponentResponsibility
DTLi18n.pyOrchestration, interactive editor, menus, console display, and report writing.
dtli18n_auditCross-checking of catalogs and sources, confidence levels, detection of the language-selection mechanism.
dtli18n_numberingConstruction of the key renumbering plan for the chosen convention.
dtli18n_learningLocal learning base of decisions made on ambiguous strings.
dtli18n_maturityCalculation of a project's i18n maturity score and overall status.
dtli18n_project_convertAnalysis of candidate strings for internationalization, key proposals, preparation of conversion changes.
dtli18n_project_scanAnalysis of a project's sources, reference collection, and controlled application of changes with backups.
dtli18n_retiredPermanent registry of retired key numbers.
dtli18n_usageFine-grained analysis of actual key usage, including partially resolved dynamic calls.

File organization

Application

DTLi18n.pydtli18n_audit.pydtli18n_numbering.pydtli18n_learning.pydtli18n_maturity.pydtli18n_project_convert.pydtli18n_project_scan.pydtli18n_retired.pydtli18n_usage.py

Complete implementation of the tool.

Processed catalog

<name>.py or <name>.json

User-supplied i18n file containing a dictionary of keys mapped to a French text and an English text.

Backups

<project root>/backup/

A copy of every modified file, created before any numbering, deletion, corrected audit, or conversion write.

Reports

dtli18n_migration_<timestamp>.jsondtli18n_audit_<timestamp>.jsondtli18n_conversion_<timestamp>.jsondtli18n_unreferenced_keys.txt

Deterministic accounts of the operations performed, written at the root of the analyzed project.

Data model

i18n catalog

A catalog is a dictionary in which each key maps either to an object holding an fr text and an en text, or, in legacy catalogs, to a plain string interpreted as French text with an empty English text. DTLi18n accepts this dictionary as a Python literal or as a JSON file, and preserves the original format on save.

Key identification

The convention DTLi18n recognizes associates each key with an alphabetic prefix, a number, and an optional label separated by a hyphen or underscore (for example t0001_key_name). This number acts as a stable handle for direct navigation, duplicate detection, and numbering; a key that does not follow this format remains editable and searchable, but has no reference number.

Retired-number registry

When a key is deleted, its number is recorded in a permanent registry tied to the catalog. That number is never proposed again by numbering, which prevents a number already encountered in the project's history, a backup, or an earlier report from later coming to designate a different text.

Local learning base

DTLi18n keeps, in a local base, the decisions made on ambiguous strings during an audit or a conversion. These decisions are reused in later analyses to propose, with an explicit confidence level, an automatic classification of cases judged similar, without ever applying that classification without the user's control.

Features

Browsing and editing a catalog

DTLi18n can display an entire catalog without changing it, or open it in an editor that shows each key with its French and English text, allows navigating entry by entry or in blocks, searching by text or key, and editing each language's text independently. An entry can be left unchanged, replaced, or explicitly cleared.

Numbering and key migration

DTLi18n can rename every key in a catalog according to the numbered convention, with a chosen starting number, prefix, and numbering width. The rename is carried through to every reference found in the project's source files. The operation is preceded by a full preview of the renaming and its statistics, and is refused outright if duplicate numbers or syntax errors already exist in the project.

Safe key deletion

Deleting a key is refused as long as references to it remain in the analyzed project's source files. Once the deletion is confirmed with a reason, the key is removed from the catalog and its number is permanently recorded in the retired-number registry.

Project reference verification

DTLi18n can cross-check a catalog against a project's source files to list references to a key missing from the catalog, and catalog keys with no observable use in the code. This analysis distinguishes a direct, literal reference from an indirect or propagated use, and flags dynamic calls whose actual key cannot be determined with certainty; the absence of an observable reference is not presented as proof of non-use.

Cross-project audit of an internationalized project

DTLi18n cross-checks the catalogs and sources of an already internationalized project to detect inconsistencies — orphaned keys, broken references, duplicate numbers, no actually demonstrated language-selection mechanism — and assigns each one a confidence level. Inconsistencies for which a deterministic, unambiguous correction exists can be applied automatically after a single confirmation, with a prior backup. The others are turned into remediation texts meant to be handled individually, outside DTLi18n. An audit before correction and an audit after correction are both recorded in the same report.

Converting a non-internationalized project

DTLi18n detects user-visible strings hardcoded in a project's Python files, and classifies them into three categories: probably translatable, probably technical, or ambiguous. Each category can be included or excluded in bulk, or reviewed string by string. Selected strings receive a proposed key under the numbered convention and are used to build a new catalog along with the corresponding source-file changes, with a prior backup and a final check of syntax and reference resolution.

i18n maturity score

DTLi18n computes, for a project, a score and an overall internationalization status, based on whether internationalization is actually detected, the completeness of French and English translations, the share of keys whose use is observed in the code, the number of strings still hardcoded or ambiguous, and whether a language-selection mechanism is demonstrably present.

Internal reference

Internal modules

ComponentRole
I18nFileReading, representing, and writing a Python or JSON catalog, with an automatic backup before each save.
EditorInteractive editing loop: navigation, search, editing, numbering, deletion, and verification from an open catalog.
EntryRepresentation of a key and its French and English text, with prefix and number extraction under the recognized convention.

Robustness and integrity

Appendices

Known limits

Versions and schemas

IdentifierValueScope
Applicationv1.1-46Distributed features.
Audit reporttool_version fieldDTLi18n version recorded in dtli18n_audit_<timestamp>.json.
Other reportstimestamp in the file nameMigration and conversion reports, not versioned independently of the application.

Glossary

TermDefinition
CatalogDictionary mapping keys to a French text and an English text.
Numbered keyKey following the prefix + number convention, serving as a stable handle within the catalog.
Retired numberNumber of a deleted key, recorded in a permanent registry and never reassigned.
Local learning baseLocal memory of decisions made on ambiguous strings, reused for future classifications.
Safe correctionDeterministic, unambiguous correction, applicable automatically after a single confirmation.
Remediation promptText meant to document and individually address an inconsistency with no automatic fix.
Ambiguous stringHardcoded string whose translatable/technical classification is not automatically determined.
Maturity scoreOverall indicator of a project's internationalization status.
Language selectorProject mechanism whose actual effect on the displayed language is demonstrated by analysis, not merely assumed.