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

translation complete #1

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Vagrant generated files
vagrant/.vagrant
vagrant/www
40 changes: 20 additions & 20 deletions open-csa-wp-db-tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

function open_csa_wp_db_tables_creation () {

global $wpdb;
global $wpdb;
$charset_collate = $wpdb->get_charset_collate();
$sql = "


$sql = "

CREATE TABLE ". OPEN_CSA_WP_TABLE_SPOTS ." (
id int(4) NOT NULL UNIQUE AUTO_INCREMENT,
spot_name varchar(30) NOT NULL,
Expand All @@ -33,17 +33,17 @@ function open_csa_wp_db_tables_creation () {
parking enum('easy','possible','hard','impossible') DEFAULT NULL,
PRIMARY KEY (id)
) $charset_collate;

CREATE TABLE ". OPEN_CSA_WP_TABLE_SPOTS_TO_USERS ." (
spot_id int(10) NOT NULL,
user_id int(10) NOT NULL,
spot_id int(10) NOT NULL,
user_id int(10) NOT NULL,
type enum('production','delivery','home') NOT NULL,
PRIMARY KEY (spot_id,user_id,type)
) $charset_collate;
) $charset_collate;

CREATE TABLE ". OPEN_CSA_WP_TABLE_PRODUCT_CATEGORIES ." (
id int(4) NOT NULL AUTO_INCREMENT,
name varchar(20) NOT NULL,
id int(4) NOT NULL AUTO_INCREMENT,
name varchar(20) NOT NULL,
description varchar(100) DEFAULT NULL,
PRIMARY KEY (id)
) $charset_collate;
Expand All @@ -52,23 +52,23 @@ function open_csa_wp_db_tables_creation () {
id int(10) NOT NULL AUTO_INCREMENT,
name varchar(30) NOT NULL,
category int(4) NOT NULL,
variety varchar(30) DEFAULT NULL,
variety varchar(30) DEFAULT NULL,
current_price_in_euro float(5) NOT NULL,
measurement_unit enum('piece', 'litre', 'kilogram', 'bunch') NOT NULL,
producer int(4) NOT NULL,
description varchar(500) DEFAULT NULL,
is_available boolean NOT NULL,
PRIMARY KEY (id)
) $charset_collate;

CREATE TABLE ". OPEN_CSA_WP_TABLE_DELIVERIES ." (
id int(11) NOT NULL AUTO_INCREMENT,
spot_id int(4) NOT NULL,
order_deadline_date date NOT NULL,
order_deadline_time time NOT NULL,
delivery_date date NOT NULL,
delivery_start_time time NOT NULL,
delivery_end_time time NOT NULL,
delivery_end_time time NOT NULL,
user_in_charge int(4) DEFAULT NULL,
are_orders_open boolean NOT NULL,
PRIMARY KEY (id)
Expand All @@ -79,24 +79,24 @@ function open_csa_wp_db_tables_creation () {
user_id int(11) NOT NULL,
product_id int(11) NOT NULL,
quantity int(4) NOT NULL,
status enum('pending', 'accomplished', 'cancelled') DEFAULT 'pending',
status enum('pending', 'accomplished', 'cancelled') DEFAULT 'pending',
custom_price float(5) DEFAULT NULL,
comments varchar(100) DEFAULT NULL,
submission_or_last_edit_datetime datetime DEFAULT NULL,
PRIMARY KEY (delivery_id,user_id,product_id)
) $charset_collate;

CREATE TABLE ". OPEN_CSA_WP_TABLE_USER_ORDERS ." (
delivery_id int(11) NOT NULL,
user_id int(11) NOT NULL,
time_of_arrival time DEFAULT NULL,
comments varchar(500) DEFAULT NULL,
submission_datetime datetime DEFAULT NOW(),
submission_datetime TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_edit_datetime datetime DEFAULT NULL,
PRIMARY KEY (delivery_id,user_id)
) $charset_collate;
";

require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
dbDelta( $sql );

Expand All @@ -110,7 +110,7 @@ function open_csa_wp_db_tables_creation () {

function open_csa_wp_db_tables_drop() {

global $wpdb;
global $wpdb;

$wpdb->query("DROP TABLE IF EXISTS ". OPEN_CSA_WP_TABLE_SPOTS);
$wpdb->query("DROP TABLE IF EXISTS ". OPEN_CSA_WP_TABLE_SPOTS_TO_USERS);
Expand Down
4 changes: 2 additions & 2 deletions open-csa-wp-deliveries.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,6 @@ function open_csa_wp_toggle_delivery_ability_to_order (delivery_id, plugins_dir)
}
image_obj.src = plugins_dir + "/open-csa-wp/icons/close.png";
text_obj.innerHTML = deliveries_translation.no;
image_obj.title = deliveries_translation.grant_ability_to_order";
image_obj.title = deliveries_translation.grant_ability_to_order;
}
}
}
12 changes: 6 additions & 6 deletions open-csa-wp-products.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function open_csa_wp_show_new_product_form($product_id, $display, $page_url) {
wp_enqueue_script( 'open-csa-wp-products-scripts' );

global $days_of_week,$wpdb;
$product_info;
$product_info = null;
if ($product_id != null) {
$product_info = $wpdb->get_results($wpdb->prepare("SELECT * FROM ".OPEN_CSA_WP_TABLE_PRODUCTS." WHERE id=%d", $product_id));
}
Expand Down Expand Up @@ -84,7 +84,7 @@ function open_csa_wp_show_new_product_form($product_id, $display, $page_url) {
selected='selected'
disabled='disabled'
id = "open-csa-wp-newProductForm_category_input_disabled_id"
>Category *</option>
><?php _e("Category", OPEN_CSA_WP_DOMAIN)?> *</option>
<?php echo open_csa_wp_select_options_from_db(
array("name"),
"id",
Expand Down Expand Up @@ -123,7 +123,7 @@ function open_csa_wp_show_new_product_form($product_id, $display, $page_url) {
?>
disabled='disabled'
id = "open-csa-wp-newProductForm_producer_input_disabled_id"
>Producer *</option>
><?php _e("Producer", OPEN_CSA_WP_DOMAIN)?> *</option>
<?php echo open_csa_wp_select_users_of_type("producer", ($product_id!=null)?$product_info[0]->producer:null, __("Producer is ", OPEN_CSA_WP_DOMAIN)); ?>
</select>
<span id="open-csa-wp-newProductForm_producer_input_span_id"></span>
Expand Down Expand Up @@ -212,7 +212,7 @@ function open_csa_wp_show_new_product_form($product_id, $display, $page_url) {
?>
disabled='disabled'
id = "open-csa-wp-newProductForm_unit_input_disabled_id"
>per... *</option>
><?php _e("per...",OPEN_CSA_WP_DOMAIN)?> *</option>
<?php echo open_csa_wp_select_measurement_unit($product_id, $product_info); ?>
</select>
<span id="open-csa-wp-newProductForm_unit_input_span_id"></span>
Expand Down Expand Up @@ -262,7 +262,7 @@ function open_csa_wp_show_new_product_form($product_id, $display, $page_url) {
?>
disabled='disabled'
id = "open-csa-wp-newProductForm_availability_input_disabled_id"
>Available? *</option>
><?php _e('Available?', OPEN_CSA_WP_DOMAIN); ?> *</option>
<?php
if ($product_id != null) {
echo '
Expand Down Expand Up @@ -673,4 +673,4 @@ function open_csa_wp_delivery_products_exist (){
} else {
return true;
}
}
}
Binary file added translations/el.mo
Binary file not shown.
Loading