Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove all uses of __() refs #4148
The userguide pages are not translated and only one language
even had entries for this stuff! No point translating 0.001%
of the content.
  • Loading branch information
zeelot committed Jun 6, 2012
1 parent 7cbe8f2 commit 712b2bf
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 90 deletions.
12 changes: 6 additions & 6 deletions classes/kohana/controller/userguide.php
Expand Up @@ -114,7 +114,7 @@ public function action_docs()
// If this module's userguide pages are disabled, show the error page
if ( ! Arr::get($config, 'enabled'))
{
return $this->error(__('That module doesn\'t exist, or has userguide pages disabled.'));
return $this->error('That module doesn\'t exist, or has userguide pages disabled.');
}

// Get the index page from config, default to "index"
Expand All @@ -123,7 +123,7 @@ public function action_docs()
// Prevent "guide/module" and "guide/module/index" from having duplicate content
if ( $page === $index)
{
return $this->error(__('Userguide page not found'));
return $this->error('Userguide page not found');
}

// If a module is set, but no page was provided in the url, show the index page
Expand All @@ -138,7 +138,7 @@ public function action_docs()
// If it's not found, show the error page
if ( ! $file)
{
return $this->error(__('Userguide page not found'));
return $this->error('Userguide page not found');
}

// Namespace the markdown parser
Expand All @@ -164,7 +164,7 @@ public function action_docs()

// Add the breadcrumb trail
$breadcrumb = array();
$breadcrumb[$this->guide->uri()] = __('User Guide');
$breadcrumb[$this->guide->uri()] = 'User Guide';
$breadcrumb[$this->guide->uri(array('module' => $module))] = Arr::get($config, 'name');

// TODO try and get parent category names (from menu). Regex magic or javascript dom stuff perhaps?
Expand All @@ -188,7 +188,7 @@ public function action_api()
// If no class was passed to the url, display the API index page
if ( ! $class)
{
$this->template->title = __('Table of Contents');
$this->template->title = 'Table of Contents';

$this->template->content = View::factory('userguide/api/toc')
->set('classes', Kodoc::class_methods())
Expand Down Expand Up @@ -233,7 +233,7 @@ public function action_api()

// Add the breadcrumb
$breadcrumb = array();
$breadcrumb[$this->guide->uri(array('page' => NULL))] = __('User Guide');
$breadcrumb[$this->guide->uri(array('page' => NULL))] = 'User Guide';
$breadcrumb[$this->request->route()->uri()] = 'API Browser';
$breadcrumb[] = $this->template->title;
}
Expand Down
6 changes: 0 additions & 6 deletions i18n/de.php

This file was deleted.

6 changes: 0 additions & 6 deletions i18n/es.php

This file was deleted.

7 changes: 0 additions & 7 deletions i18n/fr.php

This file was deleted.

6 changes: 0 additions & 6 deletions i18n/he.php

This file was deleted.

6 changes: 0 additions & 6 deletions i18n/nl.php

This file was deleted.

7 changes: 0 additions & 7 deletions i18n/ru.php

This file was deleted.

28 changes: 0 additions & 28 deletions i18n/zh.php

This file was deleted.

18 changes: 9 additions & 9 deletions views/userguide/api/class.php
Expand Up @@ -41,38 +41,38 @@

<div class="toc">
<div class="constants">
<h3><?php echo __('Constants'); ?></h3>
<h3><?php echo 'Constants'; ?></h3>
<ul>
<?php if ($doc->constants): ?>
<?php foreach ($doc->constants as $name => $value): ?>
<li><a href="#constant:<?php echo $name ?>"><?php echo $name ?></a></li>
<?php endforeach ?>
<?php else: ?>
<li><em><?php echo __('None'); ?></em></li>
<li><em><?php echo 'None'; ?></em></li>
<?php endif ?>
</ul>
</div>
<div class="properties">
<h3><?php echo __('Properties'); ?></h3>
<h3><?php echo 'Properties'; ?></h3>
<ul>
<?php if ($properties = $doc->properties()): ?>
<?php foreach ($properties as $prop): ?>
<li><a href="#property:<?php echo $prop->property->name ?>">$<?php echo $prop->property->name ?></a></li>
<?php endforeach ?>
<?php else: ?>
<li><em><?php echo __('None'); ?></em></li>
<li><em><?php echo 'None'; ?></em></li>
<?php endif ?>
</ul>
</div>
<div class="methods">
<h3><?php echo __('Methods'); ?></h3>
<h3><?php echo 'Methods'; ?></h3>
<ul>
<?php if ($methods = $doc->methods()): ?>
<?php foreach ($methods as $method): ?>
<li><a href="#<?php echo $method->method->name ?>"><?php echo $method->method->name ?>()</a></li>
<?php endforeach ?>
<?php else: ?>
<li><em><?php echo __('None'); ?></em></li>
<li><em><?php echo 'None'; ?></em></li>
<?php endif ?>
</ul>
</div>
Expand All @@ -82,7 +82,7 @@

<?php if ($doc->constants): ?>
<div class="constants">
<h1 id="constants"><?php echo __('Constants'); ?></h1>
<h1 id="constants"><?php echo 'Constants'; ?></h1>
<dl>
<?php foreach ($doc->constants as $name => $value): ?>
<dt><h4 id="constant:<?php echo $name ?>"><?php echo $name ?></h4></dt>
Expand All @@ -93,7 +93,7 @@
<?php endif ?>

<?php if ($properties = $doc->properties()): ?>
<h1 id="properties"><?php echo __('Properties'); ?></h1>
<h1 id="properties"><?php echo 'Properties'; ?></h1>
<div class="properties">
<dl>
<?php foreach ($properties as $prop): ?>
Expand All @@ -106,7 +106,7 @@
<?php endif ?>

<?php if ($methods = $doc->methods()): ?>
<h1 id="methods"><?php echo __('Methods'); ?></h1>
<h1 id="methods"><?php echo 'Methods'; ?></h1>
<div class="methods">
<?php foreach ($methods as $method): ?>
<?php echo View::factory('userguide/api/method')->set('doc', $method)->set('route', $route) ?>
Expand Down
4 changes: 2 additions & 2 deletions views/userguide/api/method.php
Expand Up @@ -27,7 +27,7 @@
<?php if ($doc->tags) echo View::factory('userguide/api/tags')->set('tags', $doc->tags) ?>

<?php if ($doc->return): ?>
<h4><?php echo __('Return Values'); ?></h4>
<h4><?php echo 'Return Values'; ?></h4>
<ul class="return">
<?php foreach ($doc->return as $set): list($type, $text) = $set; ?>
<li><code><?php echo HTML::chars($type) ?></code><?php if ($text) echo ' - '.HTML::chars(ucfirst($text)) ?></li>
Expand All @@ -37,7 +37,7 @@

<?php if ($doc->source): ?>
<div class="method-source">
<h4><?php echo __('Source Code'); ?></h4>
<h4><?php echo 'Source Code'; ?></h4>
<pre><code><?php echo HTML::chars($doc->source) ?></code></pre>
</div>
<?php endif ?>
Expand Down
2 changes: 1 addition & 1 deletion views/userguide/api/toc.php
@@ -1,4 +1,4 @@
<h1><?php echo __('Available Classes') ?></h1>
<h1><?php echo 'Available Classes' ?></h1>

<label>Filter:</label>
<input type="text" id="kodoc-api-filter-box" />
Expand Down
2 changes: 1 addition & 1 deletion views/userguide/error.php
@@ -1,3 +1,3 @@
<h1>Kodoc - <?php echo __('Error'); ?></h1>
<h1>Kodoc - <?php echo 'Error'; ?></h1>

<p><?php echo $message ?></p>
10 changes: 5 additions & 5 deletions views/userguide/template.php
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $l = substr(I18n::$lang, 0, 2) ?>" lang="<?php echo $l ?>">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<title><?php echo $title ?> | Kohana <?php echo __('User Guide'); ?></title>
<title><?php echo $title ?> | Kohana <?php echo 'User Guide'; ?></title>

<?php foreach ($styles as $style => $media) echo HTML::style($style, array('media' => $media), NULL, TRUE), "\n" ?>

Expand All @@ -23,11 +23,11 @@
<div id="kodoc-menu">
<ul>
<li class="guide first">
<a href="<?php echo Route::url('docs/guide') ?>"><?php echo __('User Guide') ?></a>
<a href="<?php echo Route::url('docs/guide') ?>">User Guide</a>
</li>
<?php if (Kohana::$config->load('userguide.api_browser')): ?>
<li class="api">
<a href="<?php echo Route::url('docs/api') ?>"><?php echo __('API Browser') ?></a>
<a href="<?php echo Route::url('docs/api') ?>">API Browser</a>
</li>
<?php endif ?>
</ul>
Expand Down Expand Up @@ -67,7 +67,7 @@
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript><?php echo __('Please enable JavaScript to view the :anchor_open comments powered by Disqus.:anchor_close', array(':anchor_open' => '<a href="http://disqus.com/?ref_noscript=kohana">', ':anchor_close' => '</a>')); ?></noscript>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=kohana">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">Documentation comments powered by <span class="logo-disqus">Disqus</span></a>
<?php endif ?>
</div>
Expand Down

0 comments on commit 712b2bf

Please sign in to comment.