Skip to main content

TranslatableFile

This class represents a file that is subject to translation within a specific directory structure. It provides properties for managing file paths and supports comparison operations based on the full path of the file.

Attributes

AttributeTypeDescription
filestringThe name of the file to be translated, used for constructing the full file path.
dirpathstringThe directory path where the translatable file is located.
locale_dirstringThe directory path containing locale-specific translation files.
pathstringThe full absolute or relative path to the file, constructed by joining the directory path and file name.

Constructor

Signature

def TranslatableFile(
dirpath: string,
file_name: string,
locale_dir: string
) - > null

Parameters

NameTypeDescription
dirpathstringThe directory path where the file is located.
file_namestringThe name of the file.
locale_dirstringThe directory containing locale translations.

Methods


path()

@classmethod
def path() - > string

Constructs the full system path for the file by joining the directory path and the filename.

Returns

TypeDescription
stringThe complete filesystem path representing the location of the translatable file.