Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
test_translations.cpp File Reference
#include "translation.h"
#include "filesys.h"
#include "content/subgames.h"
#include "catch.h"
+ Include dependency graph for test_translations.cpp:

Macros

#define CONTEXT   L"context"
 
#define TEXTDOMAIN_PO   L"translation_po"
 
#define TEST_PO_NAME   "translation_po.de.po"
 
#define TEST_MO_NAME   "translation_mo.de.mo"
 

Functions

static std::string read_translation_file (const std::string &filename)
 
 TEST_CASE ("test translations")
 

Macro Definition Documentation

◆ CONTEXT

#define CONTEXT   L"context"

Referenced by TEST_CASE().

◆ TEST_MO_NAME

#define TEST_MO_NAME   "translation_mo.de.mo"

Referenced by TEST_CASE().

◆ TEST_PO_NAME

#define TEST_PO_NAME   "translation_po.de.po"

Referenced by TEST_CASE().

◆ TEXTDOMAIN_PO

#define TEXTDOMAIN_PO   L"translation_po"

Referenced by TEST_CASE().

Function Documentation

◆ read_translation_file()

static std::string read_translation_file ( const std::string & filename)
static

References DIR_DELIM, findSubgame(), and fs::ReadFile().

Referenced by TEST_CASE().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TEST_CASE()

TEST_CASE ( "test translations" )

References CHECK, CONTEXT, Translations::getPluralTranslation(), Translations::getTranslation(), Translations::loadTranslation(), GettextPluralForm::parseHeaderLine(), read_translation_file(), Translations::size(), TEST_MO_NAME, TEST_PO_NAME, and TEXTDOMAIN_PO.

+ Here is the call graph for this function: