Sayonara Player
Namespaces | Classes | Functions
Language

methods to keep convenience between translations More...

Namespaces

 Util::Language
 language namespace
 

Classes

class  LanguageString
 The LanguageString class. More...
 
class  Lang
 The Lang class. More...
 

Functions

QString Util::Language::getSharePath (const QString &fourLetter)
 get the complete path to a language file out of the share directory More...
 
QString Util::Language::getFtpPath (const QString &fourLetter)
 get the complete path to a language file out of the ftp directory More...
 
QString Util::Language::getHttpPath (const QString &fourLetter)
 get the complete http url to a language file More...
 
QString Util::Language::getChecksumFtpPath ()
 Returns the path where checksums can be fetched from. More...
 
QString Util::Language::getChecksumHttpPath ()
 Returns the path where checksums can be fetched from. More...
 
QString Util::Language::getHomeTargetPath (const QString &fourLetter)
 get_home_target_path More...
 
QString Util::Language::getUsedLanguageFile (const QString &fourLetter)
 Returns the correct language file either from share dir or home dir. More...
 
QString Util::Language::getIconPath (const QString &fourLetter)
 Returns the icon path in share directory. More...
 
QString Util::Language::extractLanguageCode (const QString &languageFile)
 Extracts the language Code out of a sayonara_lang string. More...
 
QString Util::Language::getChecksum (const QString &fourLetter)
 calculates the checksum for the currently used language file (either home or share directory) More...
 
QString Util::Language::getLanguageVersion (const QString &fourLetter)
 Get the language version out of translations/versions file in home dir. More...
 
void Util::Language::updateLanguageVersion (const QString &fourLetter)
 Update language version in translations/versions file to current Sayonara Version. More...
 
bool Util::Language::isOutdated (const QString &fourLetter)
 Returns if the language version in translations/versions file is smaller than the current sayonara version. More...
 
QString Util::Language::getSimilarLanguage4 (const QString &fourLetter)
 get_similar_language_4 More...
 

Detailed Description

methods to keep convenience between translations

Function Documentation

◆ extractLanguageCode()

QString Util::Language::extractLanguageCode ( const QString &  languageFile)

Extracts the language Code out of a sayonara_lang string.

Parameters
language_filefilename containing sayonara_lang
Returns
four or two letter code

◆ getChecksum()

QString Util::Language::getChecksum ( const QString &  fourLetter)

calculates the checksum for the currently used language file (either home or share directory)

Parameters
fourLetterlanguage code
Returns
md5 checksum

◆ getChecksumFtpPath()

QString Util::Language::getChecksumFtpPath ( )

Returns the path where checksums can be fetched from.

Returns
ftp url

◆ getChecksumHttpPath()

QString Util::Language::getChecksumHttpPath ( )

Returns the path where checksums can be fetched from.

Returns
http url

◆ getFtpPath()

QString Util::Language::getFtpPath ( const QString &  fourLetter)

get the complete path to a language file out of the ftp directory

Parameters
fourLetter
Returns

◆ getHomeTargetPath()

QString Util::Language::getHomeTargetPath ( const QString &  fourLetter)

get_home_target_path

Parameters
fourLetter
Returns

◆ getHttpPath()

QString Util::Language::getHttpPath ( const QString &  fourLetter)

get the complete http url to a language file

Parameters
fourLetter
Returns

◆ getIconPath()

QString Util::Language::getIconPath ( const QString &  fourLetter)

Returns the icon path in share directory.

Parameters
fourLetterlanguage code
Returns

◆ getLanguageVersion()

QString Util::Language::getLanguageVersion ( const QString &  fourLetter)

Get the language version out of translations/versions file in home dir.

Parameters
fourLetterlanguage code
Returns
Sayonara version where the file belongs to

◆ getSharePath()

QString Util::Language::getSharePath ( const QString &  fourLetter)

get the complete path to a language file out of the share directory

Parameters
fourLetter
Returns

◆ getSimilarLanguage4()

QString Util::Language::getSimilarLanguage4 ( const QString &  fourLetter)

get_similar_language_4

Parameters
fourLetterlanguage code
Returns
four letter code if there's a language from another region, empty string else

◆ getUsedLanguageFile()

QString Util::Language::getUsedLanguageFile ( const QString &  fourLetter)

Returns the correct language file either from share dir or home dir.

Parameters
fourLetterlanguage code
Returns
path to qm language file

◆ isOutdated()

bool Util::Language::isOutdated ( const QString &  fourLetter)

Returns if the language version in translations/versions file is smaller than the current sayonara version.

Parameters
fourLetter
Returns
false if Sayonara Version <= Language version, true else

◆ updateLanguageVersion()

void Util::Language::updateLanguageVersion ( const QString &  fourLetter)

Update language version in translations/versions file to current Sayonara Version.

Parameters
fourLetter