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
| Attribute | Type | Description |
|---|---|---|
| file | string | The name of the file to be translated, used for constructing the full file path. |
| dirpath | string | The directory path where the translatable file is located. |
| locale_dir | string | The directory path containing locale-specific translation files. |
| path | string | The 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
| Name | Type | Description |
|---|---|---|
| dirpath | string | The directory path where the file is located. |
| file_name | string | The name of the file. |
| locale_dir | string | The 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
| Type | Description |
|---|---|
string | The complete filesystem path representing the location of the translatable file. |