Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first steps of internationalization #1

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ce627e0
Templates internationalization: first step
jeau Oct 19, 2013
b8986af
idem
jeau Oct 19, 2013
faaf51e
Functions internationalization
jeau Oct 19, 2013
695b85d
Templates internationalization
jeau Oct 19, 2013
a653208
Fix a bug with multiple variables : %s$1 -> %1$s for example
jeau Oct 19, 2013
10c71c2
Templates internationalization
jeau Oct 20, 2013
837c690
Create languages directory
jeau Oct 20, 2013
b692672
Merge remote-tracking branch 'upstream/master'
jeau Oct 22, 2013
bda40a0
Making text of subject links on browse translatable
jeau Oct 22, 2013
18e3d95
Internationalization of two forgotten strings in the info bubble map …
jeau Oct 22, 2013
50309f0
added plural form of labels lists of files (audio and image) in the d…
jeau Oct 22, 2013
adf1401
added plural form of label list of video files in the display items (…
jeau Oct 22, 2013
b541cef
Merge remote-tracking branch 'upstream/master'
jeau Oct 23, 2013
e5337fb
Enable internationalization
jeau Oct 23, 2013
a842526
add partial french translation
jeau Oct 23, 2013
3c9208b
Merge remote-tracking branch 'upstream/master'
jeau Oct 24, 2013
594c190
improvements of internationalization strings : variables are used for…
jeau Oct 24, 2013
df37998
Merge remote-tracking branch 'upstream/master'
jeau Oct 27, 2013
beb430f
Update pot file and french (experimental) translation
jeau Oct 30, 2013
dbc1e38
Merge remote-tracking branch 'upstream/master'
jeau Oct 30, 2013
6d1917e
Minor improvements of internationalization strings
jeau Oct 31, 2013
dc5052d
minor fix for languages compatibility
jeau Oct 31, 2013
5215b77
Merge remote-tracking branch 'upstream/master'
jeau Nov 26, 2013
2efa9c2
Merge remote-tracking branch 'upstream/master'
jeau Nov 30, 2013
9813d44
merge upstream
jeau Nov 30, 2013
bf2d518
Fix Omeka 2.x compatibility
jeau Dec 2, 2013
02294fc
Fix Omeka 2.x compatibility
jeau Dec 2, 2013
f0bc117
Merge remote-tracking branch 'upstream/master'
jeau Dec 3, 2013
18f2bd4
Merge remote-tracking branch 'upstream/master'
jeau Dec 3, 2013
238417d
Merge remote-tracking branch 'upstream/master'
jeau Dec 12, 2013
08cf3ff
Merge remote-tracking branch 'upstream/master'
jeau Dec 30, 2013
8a934d2
Merge remote-tracking branch 'upstream/master'
jeau Jan 23, 2014
c2a9b13
Merge remote-tracking branch 'upstream/master'
jeau May 12, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion curatescape/common/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@

</body>

</html>
</html>
2 changes: 1 addition & 1 deletion curatescape/common/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@

<figure id="hero">
<?php echo mh_which_content(@$maptype); ?>
</figure>
</figure>
2 changes: 1 addition & 1 deletion curatescape/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -313,4 +313,4 @@ custom_footer_html.options.value = ""
map_faq.type = "textarea"
map_faq.options.label = "Map FAQ (Advanced)"
map_faq.options.description = "ADVANCED: Enter custom HTML to replace the default Map FAQ text (click the marker on an individual item page to view). This text should briefly address questions about how the item locations are chosen, as well as provide guidance about whether or not every location on the site is publicly accessible. Best practice is to markup each question as a heading 3 link (&lt;h3&gt;&lt;a&gt;Question&lt;/a&gt;&lt;/h3&gt;) followed by an answer contained by a p tag (&lt;p&gt;Answer...&lt;/p&gt;). This text should be VERY BRIEF. It is NOT an appropriate place to elaborate on your project or answer questions not directly pertaining to the map."
map_faq.options.value = ""
map_faq.options.value = ""
9 changes: 9 additions & 0 deletions curatescape/contribution/contribution/admin-email.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php echo __('A new contribution to %s has been made.', get_option('site_title')); ?>

<?php echo __('Contribution URL for review:'); ?>

<?php
set_theme_base_uri('admin');
echo abs_item_uri($item);
set_theme_base_uri();
?>
2 changes: 1 addition & 1 deletion curatescape/contribution/contribution/contribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@
</div> <!-- end content -->


<?php echo foot(); ?>
<?php echo foot(); ?>
5 changes: 5 additions & 0 deletions curatescape/contribution/contribution/contributor-email.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php echo __('Thank you for your contribution to %s. Your contribution has been accepted and will be preserved in the digital archive. For your records, the permanent URL for your contribution is noted at the end of this email. Please note that contributions may not appear immediately on the website while they await processing by project staff.',get_option('site_title')); ?>

<?php echo __('Contribution URL (pending review by project staff):'); ?>

<?php echo abs_item_uri($item) ?>
1 change: 1 addition & 0 deletions curatescape/contribution/contribution/terms.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php echo get_option('contribution_consent_text'); ?>
5 changes: 1 addition & 4 deletions curatescape/contribution/contribution/thankyou.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
</aside>
</div>


<div id="primary" class="show" role="main">


<h1><?php echo __("Thank you for contributing!"); ?></h1>
<p><?php echo __("Your contribution will show up in the archive once an administrator approves it. Meanwhile, feel free to %s or %s ." , contribution_link_to_contribute(__('make another contribution')), "<a href='" . url('items/browse') . "'>" . __('browse the archive') . "</a>"); ?>
</p>
Expand All @@ -23,7 +21,6 @@

</div>


<div id="page-col-right">
<aside id="page-sidebar">

Expand All @@ -37,4 +34,4 @@



<?php echo foot(); ?>
<?php echo foot(); ?>
30 changes: 18 additions & 12 deletions curatescape/custom.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<?php

/**
* Add Curatescape translations directory for all requests.
*/
add_translation_source(dirname(__FILE__) . '/languages');

// Build some custom data for Facebook Open Graph, Twitter Cards, general SEO, etc...

// SEO Page description
Expand Down Expand Up @@ -430,7 +436,7 @@ function mh_simple_search($formProperties=array(), $uri = null){
function mh_appstore_downloads(){
if (get_theme_option('enable_app_links')){

echo '<h2>Downloads</h2>';
echo '<h2>'.__('Downloads').'</h2>';

$ios_app_id = get_theme_option('ios_app_id');
echo ($ios_app_id ?
Expand All @@ -447,7 +453,6 @@ function mh_appstore_downloads(){
</a> ':'<a id="android" class="app-store" href="#">
'.__('Coming Soon').'
</a> ');

}else{
echo '<a id="coming-soon" class="app-store" href="#">'.__('iOS + Android Apps Coming Soon!').'</a>';
}
Expand Down Expand Up @@ -683,25 +688,27 @@ function hideText(){
$fancyboxCaption = '<span class="main">Image '.($index+1).'</span>';
}

$html = '<div class="item-file-container">';
$html .= '<div class="item-file-container">';

$html .= file_markup($file, array('imageSize' => 'fullsize','linkAttributes'=>array('data-caption'=>$fancyboxCaption,'title'=>$photoTitle, 'class'=>'fancybox', 'rel'=>'group'),'imgAttributes'=>array('alt'=>$photoTitle) ) );

$html .= ($photoTitle) ? '<h4 class="title image-title">'.$photoTitle.'</h4>' : '';
$html .= ($photoDesc) ? '<p class="description image-description">'.$photoDesc.' '.link_to($file,'show', '<span class="view-file-link"> ['.__('View Additional File Details').']</span>',array('class'=>'view-file-record','rel'=>'nofollow')).'</p>' : '';
$html .= '</div>';

echo $html;
$index++;

}
}
$count = count($myphoto);
if ($count > 0) {
echo '<h3><i class="icon-camera-retro"></i>'.(($count > 1) ? __('Photos ') : __('Photo ')).'<span class="toggle instapaper_ignore">'.__('Show ').'<i class="icon-chevron-right"></i></span></h3>';
echo $html;
}
}


/*
** Loop through and display audio files
** FYI: adding "controls" to html <audio> tag causes a
** Loop through and display audio files
** FYI: adding "controls" to html <audio> tag causes a
** display error when used in combination w/ Fancybox
** image viewer
*/
Expand Down Expand Up @@ -734,7 +741,7 @@ function mh_audio_files($item,$index=0){


/*
** Loop through and display video files
** Loop through and display video files
** Please use H.264 video format
** Browsers that do not support H.264 will fallback to Flash
** We accept multiple H.264-related MIME-types because Omeka MIME detection is sometimes spotty
Expand Down Expand Up @@ -883,7 +890,6 @@ function mh_sidebar_nav(){
*/
function mh_tags(){
if (metadata('item','has tags')):

echo '<h3>'.__('Tags').'</h3>';
echo tag_cloud('item','items/browse');
endif;
Expand Down Expand Up @@ -1141,7 +1147,7 @@ function mh_custom_content($length=650){
$html .= '<article>';

$html .= '<header>';
$html .= '<h2><span class="hidden">About </span>'.option('site_title').'</h2>';
$html .= '<h2><span class="hidden">'.__('About ').'</span>'.option('site_title').'</h2>';
$html .= '<span class="find-us">'.mh_home_find_us().'</span>';
$html .= '</header><div class="about-snippet">';

Expand Down Expand Up @@ -1496,4 +1502,4 @@ function mh_showmap(){
return '<div id="showmap" class="hidden"><a style="cursor:pointer" ><i class="icon-map-marker"></i><i class="icon-camera-retro hidden"></i></a></div>';
}

?>
?>
2 changes: 1 addition & 1 deletion curatescape/error/403.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@

</article>
</div> <!-- end content -->
<?php echo foot(); ?>
<?php echo foot(); ?>
2 changes: 1 addition & 1 deletion curatescape/error/404.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@

</article>
</div> <!-- end content -->
<?php echo foot(); ?>
<?php echo foot(); ?>
4 changes: 2 additions & 2 deletions curatescape/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<?php
mh_custom_content();
echo random_item_link("View A Random ".mh_item_label('singular'),'big-button');
$text='View all <span>'.total_records('Item').' '.mh_item_label('plural').'</span>';
$text=__('View all').'<span>'.total_records('Item').' '.mh_item_label('plural').'</span>';
echo '<p class="view-more-link">'.link_to_items_browse($text).'</p>';
?>
</section>
Expand All @@ -41,4 +41,4 @@

<?php
//end stealth mode else statement
}?>
}?>
4 changes: 2 additions & 2 deletions curatescape/items/browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<section class="browse stories items">
<h2><?php
$title .= ( $total_results ? ': <span class="item-number">'.$total_results.'</span>' : '');
$title .= ( $total_results ? __(': <span class="item-number">%s</span>',$total_results) : '');
echo $title;
?></h2>

Expand Down Expand Up @@ -121,4 +121,4 @@
<?php echo mh_share_this();?>
</div>

<?php echo foot(); ?>
<?php echo foot(); ?>
2 changes: 1 addition & 1 deletion curatescape/items/show.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ function() {
})

</script>
<?php echo foot(); ?>
<?php echo foot(); ?>
2 changes: 1 addition & 1 deletion curatescape/items/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
<div id="share-this" class="browse">
<?php echo mh_share_this();?>
</div>
<?php echo foot(); ?>
<?php echo foot(); ?>
Loading