Adds i18n and nb_NO translation

This commit is contained in:
nikolark committed 2012-01-20 20:40:55 +01:00
1 parent 6f3d0a994a
commit 59eefb7123
6 files changed
+173 -19

No files matched your search

Binary file not shown.
+78
View File
@@ -0,0 +1,78 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: neuf-associations\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-01-20 19:53+0100\n"
"PO-Revision-Date: 2012-01-20 20:39+0100\n"
"Last-Translator: Nikolai Kristiansen <nikolaik@gmail.com>\n"
"Language-Team: Nikolai Kristiansen <nikolai@studentersamfundet.no>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Norwegian Bokmal\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: /home/nikolark/dev/edb/neuf-web/wp-content/plugins/neuf-associations\n"
"X-Poedit-SearchPath-0: .\n"
#: neuf-associations-post-type.php:5
msgid "Associations"
msgstr "Foreninger"
#: neuf-associations-post-type.php:6
#: neuf-associations-admin.php:6
msgid "Association"
msgstr "Forening"
#: neuf-associations-post-type.php:7
#: neuf-associations-post-type.php:8
msgid "Add New"
msgstr "Legg til ny"
#: neuf-associations-post-type.php:9
msgid "Edit Association"
msgstr "Rediger forening"
#: neuf-associations-post-type.php:10
msgid "Add New Association"
msgstr "Legg til ny"
#: neuf-associations-post-type.php:11
msgid "View Association"
msgstr "Vis forening"
#: neuf-associations-post-type.php:12
msgid "Search Associations"
msgstr "Søk i foreninger"
#: neuf-associations-post-type.php:13
msgid "No associations found"
msgstr "Ingen foreninger funnet"
#: neuf-associations-post-type.php:14
msgid "No associations found in trash"
msgstr "Ingen foreninger funnet i søpla"
#: neuf-associations-admin.php:7
msgid "Image"
msgstr "Bilde"
#: neuf-associations-admin.php:8
#: neuf-associations-admin.php:68
msgid "Website"
msgstr "Nettside"
#: neuf-associations-admin.php:9
#: neuf-associations-admin.php:70
msgid "Type"
msgstr "Type"
#: neuf-associations-admin.php:49
msgid "Association details"
msgstr "Foreningsinformasjon"
+70
View File
@@ -0,0 +1,70 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-01-20 20:37+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: neuf-associations-admin.php:6 neuf-associations-post-type.php:6
msgid "Association"
msgstr ""
#: neuf-associations-admin.php:7
msgid "Image"
msgstr ""
#: neuf-associations-admin.php:8 neuf-associations-admin.php:68
msgid "Website"
msgstr ""
#: neuf-associations-admin.php:9 neuf-associations-admin.php:70
msgid "Type"
msgstr ""
#: neuf-associations-admin.php:49
msgid "Association details"
msgstr ""
#: neuf-associations-post-type.php:5
msgid "Associations"
msgstr ""
#: neuf-associations-post-type.php:7 neuf-associations-post-type.php:8
msgid "Add New"
msgstr ""
#: neuf-associations-post-type.php:9
msgid "Edit Association"
msgstr ""
#: neuf-associations-post-type.php:10
msgid "Add New Association"
msgstr ""
#: neuf-associations-post-type.php:11
msgid "View Association"
msgstr ""
#: neuf-associations-post-type.php:12
msgid "Search Associations"
msgstr ""
#: neuf-associations-post-type.php:13
msgid "No associations found"
msgstr ""
#: neuf-associations-post-type.php:14
msgid "No associations found in trash"
msgstr ""
+9 -8
View File
@@ -3,10 +3,10 @@
function neuf_associations_change_columns( $cols ) {
$custom_cols = array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Forening', 'trans' ),
'image' => __( 'Bilde', 'trans' ),
'homepage' => __( 'Hjemmeside', 'trans' ),
'type' => __( 'Type', 'trans' ),
'title' => __( 'Association', 'neuf_assoc' ),
'image' => __( 'Image', 'neuf_assoc' ),
'homepage' => __( 'Website', 'neuf_assoc' ),
'type' => __( 'Type', 'neuf_assoc' ),
);
return $custom_cols;
}
@@ -46,7 +46,7 @@ add_filter( "manage_edit-association_sortable_columns", "neuf_associations_sorta
function add_associations_metaboxes() {
add_meta_box(
'neuf_associations_div',
__('Foreningsinformasjon'),
__('Association details', 'neuf_assoc'),
'neuf_associations_div',
'association',
'side'
@@ -58,15 +58,16 @@ function add_associations_metaboxes() {
function neuf_associations_div(){
global $post;
/* Static types */
$association_types = array('Forening', 'Utvalg');
$association_type = get_post_meta( $post->ID, '_neuf_associations_type', true );
$association_type = get_post_meta( $post->ID, '_neuf_associations_type', true );
$association_homepage = get_post_meta( $post->ID, '_neuf_associations_homepage', true );
?>
<div class="misc-pub-section misc-pub-section-last">
<label for="_neuf_associations_homepage">Hjemmeside:</label>
<label for="_neuf_associations_homepage"><?php _e( 'Website', 'neuf_assoc' ); ?></label>
<input type="text" name="_neuf_associations_homepage" value="<?php echo $association_homepage ? $association_homepage : ""; ?>" />
<label for="_neuf_associations_type">Type:</label>
<label for="_neuf_associations_type"><?php _e( 'Type', 'neuf_assoc' ); ?>:</label>
<select name="_neuf_associations_type">
<?php foreach ($association_types as $type) {
echo '<option value="'.$type.'"';
+10 -10
View File
@@ -2,16 +2,16 @@
/* Setup the custom post type */
function neuf_associations_post_type() {
$labels = array(
'name' => __( 'Associations' ),
'singular_name' => __( 'Association' ),
'add_new' => __( 'Add New Association' ),
'add_new_item' => __( 'Add New Association' ),
'edit_item' => __( 'Edit Association' ),
'new_item' => __( 'Add New Association' ),
'view_item' => __( 'View Association' ),
'search_items' => __( 'Search Associations' ),
'not_found' => __( 'No associations found' ),
'not_found_in_trash' => __( 'No associations found in trash' )
'name' => __( 'Associations', 'neuf_assoc'),
'singular_name' => __( 'Association', 'neuf_assoc'),
'add_new' => __( 'Add New', 'neuf_assoc'),
'add_new_item' => __( 'Add New', 'neuf_assoc'),
'edit_item' => __( 'Edit Association', 'neuf_assoc'),
'new_item' => __( 'Add New Association', 'neuf_assoc'),
'view_item' => __( 'View Association', 'neuf_assoc'),
'search_items' => __( 'Search Associations', 'neuf_assoc'),
'not_found' => __( 'No associations found', 'neuf_assoc'),
'not_found_in_trash' => __( 'No associations found in trash', 'neuf_assoc')
);
register_post_type(
'association',
+6 -1
View File
@@ -7,18 +7,23 @@
Author: EDB-web
Author URI: http://www.studentersamfundet.no
License: GPL v2 or later
Text Domain: neuf_assoc
*/
/* TODO (nikolark):
* - Pickup stuff from: http://codex.wordpress.org/Post_Types
* - Translate it: http://codex.wordpress.org/I18n_for_WordPress_Developers
*/
require_once( 'neuf-associations-post-type.php' );
require_once( 'neuf-associations-admin.php' );
/* Register the translations */
add_action( 'init' , 'neuf_associations_i18n' , 0 );
/* Register the post type */
add_action( 'init' , 'neuf_associations_post_type' , 0 );
add_action( 'save_post' , 'neuf_associations_save_postdata');
//add_action( 'publish_post' , 'neuf_associations_save_postdata' );
function neuf_associations_i18n() {
load_plugin_textdomain( 'neuf_assoc', false, dirname( plugin_basename( __FILE__ ) ) .'/languages' );
}
?>