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::get_share_path (const QString &four_letter)
 get the complete path to a language file out of the share directory More...
 
QString Util::Language::get_ftp_path (const QString &four_letter)
 get the complete path to a language file out of the ftp directory More...
 
QString Util::Language::get_http_path (const QString &four_letter)
 get the complete http url to a language file More...
 
QString Util::Language::get_checksum_ftp_path ()
 Returns the path where checksums can be fetched from. More...
 
QString Util::Language::get_checksum_http_path ()
 Returns the path where checksums can be fetched from. More...
 
QString Util::Language::get_home_target_path (const QString &four_letter)
 get_home_target_path More...
 
QString Util::Language::get_used_language_file (const QString &four_letter)
 Returns the correct language file either from share dir or home dir. More...
 
QString Util::Language::get_icon_path (const QString &four_letter)
 Returns the icon path in share directory. More...
 
QString Util::Language::extract_four_letter (const QString &language_file)
 Extracts the language Code out of a sayonara_lang string. More...
 
QString Util::Language::get_checksum (const QString &four_letter)
 calculates the checksum for the currently used language file (either home or share directory) More...
 
QString Util::Language::get_language_version (const QString &four_letter)
 Get the language version out of translations/versions file in home dir. More...
 
void Util::Language::update_language_version (const QString &four_letter)
 Update language version in translations/versions file to current Sayonara Version. More...
 
bool Util::Language::is_outdated (const QString &four_letter)
 Returns if the language version in translations/versions file is smaller than the current sayonara version. More...
 
QString Util::Language::get_similar_language_4 (const QString &four_letter)
 get_similar_language_4 More...
 

Detailed Description

methods to keep convenience between translations

Function Documentation

◆ extract_four_letter()

QString Util::Language::extract_four_letter ( const QString &  language_file)

Extracts the language Code out of a sayonara_lang string.

Parameters
language_filefilename containing sayonara_lang
Returns

◆ get_checksum()

QString Util::Language::get_checksum ( const QString &  four_letter)

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

Parameters
four_letterlanguage code
Returns
md5 checksum

◆ get_checksum_ftp_path()

QString Util::Language::get_checksum_ftp_path ( )

Returns the path where checksums can be fetched from.

Returns
ftp url

◆ get_checksum_http_path()

QString Util::Language::get_checksum_http_path ( )

Returns the path where checksums can be fetched from.

Returns
http url

◆ get_ftp_path()

QString Util::Language::get_ftp_path ( const QString &  four_letter)

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

Parameters
four_letter
Returns

◆ get_home_target_path()

QString Util::Language::get_home_target_path ( const QString &  four_letter)

get_home_target_path

Parameters
four_letter
Returns

◆ get_http_path()

QString Util::Language::get_http_path ( const QString &  four_letter)

get the complete http url to a language file

Parameters
four_letter
Returns

◆ get_icon_path()

QString Util::Language::get_icon_path ( const QString &  four_letter)

Returns the icon path in share directory.

Parameters
four_letterlanguage code
Returns

◆ get_language_version()

QString Util::Language::get_language_version ( const QString &  four_letter)

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

Parameters
four_letterlanguage code
Returns
Sayonara version where the file belongs to

◆ get_share_path()

QString Util::Language::get_share_path ( const QString &  four_letter)

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

Parameters
four_letter
Returns

◆ get_similar_language_4()

QString Util::Language::get_similar_language_4 ( const QString &  four_letter)

get_similar_language_4

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

◆ get_used_language_file()

QString Util::Language::get_used_language_file ( const QString &  four_letter)

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

Parameters
four_letterlanguage code
Returns
path to qm language file

◆ is_outdated()

bool Util::Language::is_outdated ( const QString &  four_letter)

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

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

◆ update_language_version()

void Util::Language::update_language_version ( const QString &  four_letter)

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

Parameters
four_letter