Skip to content

Commit

Permalink
WEB: Put all strings into lang.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 16, 2016
1 parent 590f6f0 commit 441e2f9
Show file tree
Hide file tree
Showing 16 changed files with 105 additions and 43 deletions.
6 changes: 4 additions & 2 deletions include/Pages/ContactPage.php
Expand Up @@ -12,10 +12,12 @@ public function __construct() {

/* Display the index page. */
public function index() {
global $Smarty;

return $this->renderPage(
array(
'title' => 'Contact',
'content_title' => 'Contact',
'title' => $Smarty->_config[0]['vars']['contactTitle'],
'content_title' => $Smarty->_config[0]['vars']['contactContentTitle'],
),
$this->_template
);
Expand Down
5 changes: 3 additions & 2 deletions include/Pages/CreditsPage.php
Expand Up @@ -14,12 +14,13 @@ public function __construct() {
/* Display the index page. */
public function index() {
$credits = CreditsModel::getAllCredits();
global $Smarty;

$this->addCSSFiles('credits.css');
return $this->renderPage(
array(
'title' => 'Credits',
'content_title' => 'Credits',
'title' => $Smarty->_config[0]['vars']['creditsTitle'],
'content_title' => $Smarty->_config[0]['vars']['creditsContentTitle'],
'credits' => $credits,
),
$this->_template
Expand Down
5 changes: 3 additions & 2 deletions include/Pages/DemosPage.php
Expand Up @@ -14,12 +14,13 @@ public function __construct() {
/* Display the index page. */
public function index() {
$demos = GameDemosModel::getAllGroupsAndDemos();
global $Smarty;

$this->addCSSFiles('chart.css');
return $this->renderPage(
array(
'title' => 'Game Demos',
'content_title' => 'Game Demos',
'title' => $Smarty->_config[0]['vars']['demosTitle'],
'content_title' => $Smarty->_config[0]['vars']['demosContentTitle'],
'demos' => $demos,
),
$this->_template
Expand Down
5 changes: 3 additions & 2 deletions include/Pages/DocumentationPage.php
Expand Up @@ -14,12 +14,13 @@ public function __construct() {
/* Display the index page. */
public function index() {
$document = $_GET['d'];
global $Smarty;

$documents = DocumentationModel::getAllDocuments();
return $this->renderPage(
array(
'title' => 'Documentation',
'content_title' => 'ScummVM Documentation',
'title' => $Smarty->_config[0]['vars']['documentationTitle'],
'content_title' => $Smarty->_config[0]['vars']['documentationContentTitle'],
'documents' => $documents,
),
$this->_template
Expand Down
13 changes: 7 additions & 6 deletions include/Pages/DownloadsPage.php
Expand Up @@ -13,12 +13,12 @@ public function __construct() {

function getRecommendedDownloadsJS(&$downloads) {
$js = "var versions = {\n";

foreach ($downloads as $dsection) {
foreach ($dsection->getSubSections() as $dsubsection) {
foreach ($dsubsection->getItems() as $curItem) {
$userAgent = $curItem->getUserAgent();

if ($userAgent != "") {
$url = str_replace('{$release}', RELEASE, $curItem->getURL());
sscanf($url, "http://prdownloads.sourceforge.net/scummvm/scummvm-%s", $versionStr);
Expand All @@ -30,21 +30,22 @@ function getRecommendedDownloadsJS(&$downloads) {
}
}
$js .= "};\n";

return $js;
}

/* Display the index page. */
public function index() {
$downloads = DownloadsModel::getAllDownloads();
$sections = DownloadsModel::getAllSections();
$recommendedDownloadsJS = $this->getRecommendedDownloadsJS($downloads);
global $Smarty;

$this->addCSSFiles('downloads.css');
return $this->renderPage(
array(
'title' => 'Downloads',
'content_title' => 'Download ScummVM',
'title' => $Smarty->_config[0]['vars']['downloadsTitle'],
'content_title' => $Smarty->_config[0]['vars']['downloadsContentTitle'],
'downloads' => $downloads,
'sections' => $sections,
'release_tools' => RELEASE_TOOLS,
Expand Down
6 changes: 4 additions & 2 deletions include/Pages/ExceptionsPage.php
Expand Up @@ -12,10 +12,12 @@ public function __construct() {

/* Display the index page. */
public function index($exception) {
global $Smarty;

return $this->renderPage(
array(
'title' => 'Exception',
'content_title' => 'Error processing request',
'title' => $Smarty->_config[0]['vars']['exceptionsTitle'],
'content_title' => $Smarty->_config[0]['vars']['exceptionsContentTitle'],
'exception' => $exception,
),
'exception.tpl'
Expand Down
5 changes: 3 additions & 2 deletions include/Pages/FAQPage.php
Expand Up @@ -15,12 +15,13 @@ public function __construct() {
public function index() {
$contents = FAQModel::getFAQ();
$modified = FAQModel::getLastUpdated();
global $Smarty;

$this->addCSSFiles('faq.css');
return $this->renderPage(
array(
'title' => 'F.A.Q.',
'content_title' => 'FAQ :: Frequently Asked Questions',
'title' => $Smarty->_config[0]['vars']['faqTitle'],
'content_title' => $Smarty->_config[0]['vars']['faqContentTitle'],
'contents' => $contents,
'modified' => $modified,
),
Expand Down
5 changes: 3 additions & 2 deletions include/Pages/GamesPage.php
Expand Up @@ -15,12 +15,13 @@ public function __construct() {
public function index() {
$downloads = GamesModel::getAllDownloads();
$sections = GamesModel::getAllSections();
global $Smarty;

$this->addCSSFiles('games.css');
return $this->renderPage(
array(
'title' => 'Games',
'content_title' => 'Download freeware games',
'title' => $Smarty->_config[0]['vars']['gamesTitle'],
'content_title' => $Smarty->_config[0]['vars']['gamesContentTitle'],
'downloads' => $downloads,
'sections' => $sections,
'release_tools' => RELEASE_TOOLS,
Expand Down
5 changes: 3 additions & 2 deletions include/Pages/LinksPage.php
Expand Up @@ -14,12 +14,13 @@ public function __construct() {
/* Display the index page. */
public function index() {
$links = LinksModel::getAllGroupsAndLinks();
global $Smarty;

$this->addCSSFiles('links.css');
return $this->renderPage(
array(
'title' => 'Links',
'content_title' => 'Links',
'title' => $Smarty->_config[0]['vars']['linksTitle'],
'content_title' => $Smarty->_config[0]['vars']['linksContentTitle'],
'links' => $links,
),
$this->_template
Expand Down
8 changes: 4 additions & 4 deletions include/Pages/NewsPage.php
Expand Up @@ -44,8 +44,8 @@ public function getNews($date = null) {

return $this->renderPage(
array(
'title' => 'Home',
'content_title' => $Smarty->_config[0]['vars']['newsTitle'],
'title' => $Smarty->_config[0]['vars']['newsTitle'],
'content_title' => $Smarty->_config[0]['vars']['newsContentTitle'],
'show_intro' => false,
'news_items' => $news_items,
'news_archive_link' => false,
Expand Down Expand Up @@ -76,8 +76,8 @@ public function getNewsIntro() {

return $this->renderPage(
array(
'title' => 'Home',
'content_title' => $Smarty->_config[0]['vars']['newsTitle'],
'title' => $Smarty->_config[0]['vars']['newsTitle'],
'content_title' => $Smarty->_config[0]['vars']['newsContentTitle'],
'show_intro' => true,
'news_items' => $news_items,
'news_archive_link' => true,
Expand Down
6 changes: 4 additions & 2 deletions include/Pages/PressPage.php
Expand Up @@ -14,10 +14,12 @@ public function __construct() {
/* Display the index page. */
public function index() {
$articles = ArticleModel::getAllArticles();
global $Smarty;

return $this->renderPage(
array(
'title' => 'Press Coverage',
'content_title' => 'Press Coverage',
'title' => $Smarty->_config[0]['vars']['pressTitle'],
'content_title' => $Smarty->_config[0]['vars']['pressContentTitle'],
'articles' => $articles,
),
$this->_template
Expand Down
6 changes: 4 additions & 2 deletions include/Pages/PressSnowberryPage.php
Expand Up @@ -14,10 +14,12 @@ public function __construct() {
/* Display the index page. */
public function index() {
$articles = ArticleModel::getAllArticles();
global $Smarty;

return $this->renderPage(
array(
'title' => 'GOBLIIINS + ScummVM = PERFECT COUPLE',
'content_title' => 'GOBLIIINS + ScummVM = PERFECT COUPLE',
'title' => $Smarty->_config[0]['vars']['pressSnowberryTitle'],
'content_title' => $Smarty->_config[0]['vars']['pressSnowberryContentTitle'],
'articles' => $articles,
),
$this->_template
Expand Down
12 changes: 8 additions & 4 deletions include/Pages/ScreenshotsPage.php
Expand Up @@ -77,10 +77,12 @@ public function getCategory($category, $game) {
);
}

global $Smarty;

return $this->renderPage(
array(
'title' => 'Screenshots',
'content_title' => 'Screenshots',
'title' => $Smarty->_config[0]['vars']['screenshotsTitle'],
'content_title' => $Smarty->_config[0]['vars']['screenshotsContentTitle'],
'screenshots' => $screenshots,
'category' => $category,
'game' => $game,
Expand All @@ -95,10 +97,12 @@ public function getGame($category, $game, $num = 1) {

$screenshot = ScreenshotsModel::getTargetScreenshots($game);

global $Smarty;

return $this->renderPage(
array(
'title' => 'Screenshots',
'content_title' => 'Screenshots',
'title' => $Smarty->_config[0]['vars']['screenshotsTitle'],
'content_title' => $Smarty->_config[0]['vars']['screenshotsContentTitle'],
'screenshot' => $screenshot,
'category' => $category,
'game' => $game,
Expand Down
6 changes: 4 additions & 2 deletions include/Pages/SubprojectsPage.php
Expand Up @@ -14,10 +14,12 @@ public function __construct() {
/* Display the index page. */
public function index() {
$subprojects = SubprojectsModel::getAllSubprojects();
global $Smarty;

return $this->renderPage(
array(
'title' => 'Subprojects',
'content_title' => 'Subprojects',
'title' => $Smarty->_config[0]['vars']['subprojectsTitle'],
'content_title' => $Smarty->_config[0]['vars']['subprojectsContentTitle'],
'subprojects' => $subprojects,
),
$this->_template
Expand Down
44 changes: 42 additions & 2 deletions lang/lang.ini
@@ -1,5 +1,3 @@
newsTitle = "Latest Developments"

screenshotsTitle = "Screenshots"
screenshotsContentTitle = "Screenshots"

Expand All @@ -10,3 +8,45 @@ compatibilityGood = "Good"
compatibilityExcellent = "Excellent"
compatibilityTitle = "Compatibility - {version}"
compatibilityContentTitle = "{version} Compatibility"

contactTitle = "Contact"
contactContentTitle = "Contact"

creditsTitle = "Credits"
creditsContentTitle = "Credits"

demosTitle = "Game Demos"
demosContentTitle = "Game Demos"

documentationTitle = "Documentation"
documentationContentTitle = "ScummVM Documentation"

downloadsTitle = "Downloads"
downloadsContentTitle = "Download ScummVM"

exceptionsTitle = "Exception"
exceptionsContentTitle = "Error processing request"

faqTitle = "F.A.Q."
faqContentTitle = "FAQ :: Frequently Asked Questions"

gamesTitle = "Games"
gamesContentTitle = "Download freeware games"

linksTitle = "Links"
linksContentTitle = "Links"

newsTitle = "Home"
newsContentTitle = "Latest Developments"

pressTitle = "Press Coverage"
pressContentTitle = "Press Coverage"

pressSnowberryTitle = "GOBLIIINS + ScummVM = PERFECT COUPLE"
pressSnowberryContentTitle = "GOBLIIINS + ScummVM = PERFECT COUPLE"

screenshotsTitle = "Screenshots"
screenshotsContentTitle = "Screenshots"

subprojectsTitle = "Subprojects"
subprojectsContentTitle = "Subprojects"
11 changes: 6 additions & 5 deletions lang/lang.ru.ini
@@ -1,12 +1,13 @@
newsTitle = "Последние новости"

screenshotsTitle = "Скриншоты"
screenshotsContentTitle = "Скриншоты"

compatibilityUntested = "Не тестирована"
compatibilityBroken = "Сломана"
compatibilityBugged = "С багами"
compatibilityGood = "Хорошая"
compatibilityExcellent = "Превосходная"
compatibilityTitle = "Совместимость - {version}"
compatibilityContentTitle = "Совместимость версии {version}"

newsTitle = "Главная"
newsContentTitle = "Последние новости"

screenshotsTitle = "Скриншоты"
screenshotsContentTitle = "Скриншоты"

0 comments on commit 441e2f9

Please sign in to comment.