diff --git a/lib/ProductOpener/Ecoscore.pm b/lib/ProductOpener/Ecoscore.pm index d7d76af6a591b..d26ebe87770b5 100644 --- a/lib/ProductOpener/Ecoscore.pm +++ b/lib/ProductOpener/Ecoscore.pm @@ -20,7 +20,7 @@ =head1 NAME -ProductOpener::Ecoscore - compute the Ecoscore environemental grade of a food product +ProductOpener::Ecoscore - compute the Ecoscore environmental grade of a food product =head1 SYNOPSIS @@ -92,7 +92,7 @@ The list is different from %ecoscore_countries that can contain more countries f data to compute the Eco-Score (e.g. distances). 2021-10-28: we will now enable Eco-Score for all available countries, -so this list will be overriden when we load the Eco-Score data. +so this list will be overrode when we load the Eco-Score data. =cut diff --git a/lib/ProductOpener/Food.pm b/lib/ProductOpener/Food.pm index 6308d4c3e143a..152dc22a14a99 100644 --- a/lib/ProductOpener/Food.pm +++ b/lib/ProductOpener/Food.pm @@ -1179,7 +1179,7 @@ $log->debug("Nutrient levels initialized") if $log->is_debug(); =head2 canonicalize_nutriment ( $product_ref ) -Canonicalizes the nutrients unput by the user in the nutrition table product edit. +Canonicalizes the nutrients input by the user in the nutrition table product edit. This sub converts these nutrients (which are arguments to this function), into a recognizable/standard form. =head3 Parameters @@ -1516,7 +1516,7 @@ my @fruits_vegetables_nuts_by_category_sorted = sort { $fruits_vegetables_nuts_b Determines if we have enough data to compute the Nutri-Score (category + nutrition facts), and if the Nutri-Score is applicable to the product the category. -Populates the data structure needed to commpute the Nutri-Score and computes it. +Populates the data structure needed to compute the Nutri-Score and computes it. =cut diff --git a/lib/ProductOpener/FoodGroups.pm b/lib/ProductOpener/FoodGroups.pm index 9179bcaddcb64..2bb33f3c787a9 100644 --- a/lib/ProductOpener/FoodGroups.pm +++ b/lib/ProductOpener/FoodGroups.pm @@ -25,7 +25,7 @@ ProductOpener::Food - functions related to food products and nutrition =head1 DESCRIPTION The C module contains functions to determine a product -food group. Food groups are a 3 level hiearchy of groups that are used by researchers +food group. Food groups are a 3 level hierarchy of groups that are used by researchers (in particular researches from the EREN team that created the Nutri-Score). In France, food groups are referred to as "PNNS groups" (PNNS stands for "Programme National Nutrition et Santé"). diff --git a/lib/ProductOpener/ForestFootprint.pm b/lib/ProductOpener/ForestFootprint.pm index 2af47b5b05602..d2cde432ff1f0 100644 --- a/lib/ProductOpener/ForestFootprint.pm +++ b/lib/ProductOpener/ForestFootprint.pm @@ -31,7 +31,7 @@ C is used to compute the forest footprint of a food pro The modules implements the forest footprint computation as defined by the French NGO Envol Vert. The computation is based on the amount of soy needed to produce the ingredients, -and the risk that thay soy contributed to deforestation. +and the risk that that soy contributed to deforestation. =cut @@ -312,7 +312,7 @@ This function is called when we have an ingredient or a category for which we ha It determines the type of the footprint based on labels, origins etc. and adds a corresponding footprint to the list of footprints for the products (possibly several if the product has multiple ingredients with a footprint) -=head3 Synopsys +=head3 Synopsis add_footprint($product_ref, $ingredient_ref, $footprints_ref, $ingredients_category_ref, { tag => ["ingredients", $ingredients_ref->{id}, $category_ingredient_id], diff --git a/lib/ProductOpener/GS1.pm b/lib/ProductOpener/GS1.pm index 14889c8da655c..c5466d50e35f6 100644 --- a/lib/ProductOpener/GS1.pm +++ b/lib/ProductOpener/GS1.pm @@ -1739,7 +1739,7 @@ sub write_off_csv_file($$) { =head2 print_unknown_entries_in_gs1_maps () Prints the entries for GS1 data types for which we do not have a corresponding OFF match, -ordered by the number of occurences in the GS1 data +ordered by the number of occurrences in the GS1 data =cut diff --git a/lib/ProductOpener/Import.pm b/lib/ProductOpener/Import.pm index c6092daec1604..24032226ef919 100644 --- a/lib/ProductOpener/Import.pm +++ b/lib/ProductOpener/Import.pm @@ -290,7 +290,7 @@ If the user_id is 'all', the change will be attributed to the org of the product =head4 org_id - optional -Organisation id to which the changes (new products, added or changed values, new images) +Organization id to which the changes (new products, added or changed values, new images) will be attributed. =head4 owner_id - optional @@ -301,7 +301,7 @@ Values are of the form user-[user id] or org-[organization id]. If not set, for databases with private products, it will be constructed from the user_id and org_id parameters. -The owner can be overriden if the CSV file contains a org_name field. +The owner can be overrode if the CSV file contains a org_name field. In that case, the owner is set to the value of the org_name field, and a new org is created if it does not exist yet. @@ -344,11 +344,11 @@ URL for the source. =head4 source_licence - optional (unless no_source is indicated) -Licence that the source data is available in. +License that the source data is available in. =head4 source_licence_url - optional (unless no_source is indicated) -URL for the licence. +URL for the license. =head4 manufacturer - optional @@ -504,7 +504,7 @@ sub import_csv_file($) { $i++; # By default, use the orgid passed in the arguments - # it may be overriden later on a per product basis + # it may be overrode later on a per product basis my $org_id = $args_ref->{org_id}; my $org_ref; @@ -669,7 +669,7 @@ sub import_csv_file($) { $Owner_id = get_owner_id($User_id, $Org_id, $args_ref->{owner_id}); my $product_id = product_id_for_owner($Owner_id, $code); - # The userid can be overriden on a per product basis + # The userid can be overrode on a per product basis # when we import data from the producers platform to the public platform # we use the orgid as the userid my $user_id = $args_ref->{user_id}; @@ -2177,7 +2177,7 @@ will be attributed. =head4 org_id - optional -Organisation id to which the changes (new products, added or changed values, new images) +Organization id to which the changes (new products, added or changed values, new images) will be attributed. =head4 owner_id - optional @@ -2188,7 +2188,7 @@ Values are of the form user-[user id] or org-[organization id]. If not set, for databases with private products, it will be constructed from the user_id and org_id parameters. -The owner can be overriden if the CSV file contains a org_name field. +The owner can be overrode if the CSV file contains a org_name field. In that case, the owner is set to the value of the org_name field, and a new org is created if it does not exist yet. @@ -2234,7 +2234,7 @@ sub update_export_status_for_csv_file($) { $i++; # By default, use the orgid passed in the arguments - # it may be overriden later on a per product basis + # it may be overrode later on a per product basis my $org_id = $args_ref->{org_id}; # The option import_owner is used when exporting from the producers database to the public database @@ -2310,7 +2310,7 @@ will be attributed. =head4 org_id - optional -Organisation id to which the changes (new products, added or changed values, new images) +Organization id to which the changes (new products, added or changed values, new images) will be attributed. =head4 owner_id - required diff --git a/lib/ProductOpener/Ingredients.pm b/lib/ProductOpener/Ingredients.pm index eac08230f15bf..7c45e764ebac6 100644 --- a/lib/ProductOpener/Ingredients.pm +++ b/lib/ProductOpener/Ingredients.pm @@ -26,7 +26,7 @@ ProductOpener::Ingredients - process and analyze ingredients lists C processes, normalize, parses and analyze ingredients lists to extract and recognize individual ingredients, -additives and allernes, and to compute product properties related to +additives and allergens, and to compute product properties related to ingredients (is the product vegetarian, vegan, does it contain palm oil etc.) use ProductOpener::Ingredients qw/:all/; @@ -2883,7 +2883,7 @@ sub compute_ingredients_percent_estimates($$) { This function analyzes ingredients to see the ones that are vegan, vegetarian, from palm oil etc. and computes the resulting value for the complete product. -The results are overriden by labels like "Vegan", "Vegetarian" or "Palm oil free" +The results are overrode by labels like "Vegan", "Vegetarian" or "Palm oil free" Results are stored in the ingredients_analysis_tags array. diff --git a/lib/ProductOpener/KnowledgePanels.pm b/lib/ProductOpener/KnowledgePanels.pm index 51e959bfc3692..69559fe9d0af1 100644 --- a/lib/ProductOpener/KnowledgePanels.pm +++ b/lib/ProductOpener/KnowledgePanels.pm @@ -204,7 +204,7 @@ Some special features that are not included in the JSON format are supported: 1. Relative links are converted to absolute links using the requested country / language subdomain -2. Multiline strings can be included using backticks ` at the start and end of the multinine strings. +2. Multiline strings can be included using backticks ` at the start and end of the multiline strings. - The multiline strings will be converted to a single string. - Quotes " are automatically escaped unless they are already escaped diff --git a/lib/ProductOpener/MainCountries.pm b/lib/ProductOpener/MainCountries.pm index e7cb092be33e8..d7ed84e5c2a7c 100644 --- a/lib/ProductOpener/MainCountries.pm +++ b/lib/ProductOpener/MainCountries.pm @@ -78,7 +78,7 @@ use ProductOpener::Products qw/:all/; =head2 load_scans_data() -Loads scans data agregated by country from the products/all_products_scans.json +Loads scans data aggregated by country from the products/all_products_scans.json file generated by scanbot.pl =cut diff --git a/lib/ProductOpener/Packaging.pm b/lib/ProductOpener/Packaging.pm index 3b8c70bac1156..6623cd4e241f8 100644 --- a/lib/ProductOpener/Packaging.pm +++ b/lib/ProductOpener/Packaging.pm @@ -167,7 +167,7 @@ existing packaging tags will be prefixed by the product language. =head4 $text_language default text language -Can be overriden if the text is prefixed with a language code (e.g. fr:boite en carton) +Can be overrode if the text is prefixed with a language code (e.g. fr:boite en carton) =head3 Return value diff --git a/lib/ProductOpener/Products.pm b/lib/ProductOpener/Products.pm index 9a4b2c96ac872..8179d8c0a9e40 100644 --- a/lib/ProductOpener/Products.pm +++ b/lib/ProductOpener/Products.pm @@ -907,7 +907,7 @@ Used on the web site for facets pages, except the index page. =head3 popularity_key - Popular and recent products -Used for the Personal Search project to provide generic search results that apps can personlize later. +Used for the Personal Search project to provide generic search results that apps can personalize later. =cut diff --git a/lib/ProductOpener/Recipes.pm b/lib/ProductOpener/Recipes.pm index b2d60c9309435..fbe3185ee4b96 100644 --- a/lib/ProductOpener/Recipes.pm +++ b/lib/ProductOpener/Recipes.pm @@ -29,10 +29,10 @@ This module contains functions to compute the distribution of specific ingredien a specified set of products. For instance, one can compute the distribution of water, sugar and fruits -for products in the fruit nectars category. +for products in the fruit nectar category. Functions in this module can be called through scripts for batch processing, -and/or they could also be called for realtime analysis through the API or web interface +and/or they could also be called for real time analysis through the API or web interface (for a small enough set of products). =head1 DESCRIPTION diff --git a/lib/ProductOpener/Test.pm b/lib/ProductOpener/Test.pm index ddc636280eb0f..5c392d9c7fca7 100644 --- a/lib/ProductOpener/Test.pm +++ b/lib/ProductOpener/Test.pm @@ -207,7 +207,7 @@ This is so that we can easily see diffs with git diffs: =head4 $update_expected_results - flag to indicate to save test results as expected results -Tests will pass when this flag is passed, and the new expected results can be diffed / commited in GitHub. +Tests will pass when this flag is passed, and the new expected results can be diffed / committed in GitHub. =cut @@ -256,7 +256,7 @@ This is so that we can easily see diffs with git diffs: =head4 $update_expected_results - flag to indicate to save test results as expected results Tests will always pass when this flag is passed, -and the new expected results can be diffed / commited in GitHub. +and the new expected results can be diffed / committed in GitHub. =cut @@ -374,9 +374,9 @@ sub _sub_items($item_ref, $subfields_ref) { =head2 normalize_product_for_test_comparison(product_ref) -Normalize a product to be able to compare them accross tests runs. +Normalize a product to be able to compare them across tests runs. -We remove time dependant fields and sort some lists. +We remove time dependent fields and sort some lists. =head3 Arguments diff --git a/lib/ProductOpener/Users.pm b/lib/ProductOpener/Users.pm index f3d59f56c9492..137eddf25a280 100644 --- a/lib/ProductOpener/Users.pm +++ b/lib/ProductOpener/Users.pm @@ -242,7 +242,7 @@ sub is_admin_user($user_id) { =head2 check_user_form() C This method checks and validates the different entries in the user form. -It also handles Spam-usernames, feilds for the organisation accounts. +It also handles Spam-usernames, fields for the organization accounts. =cut @@ -640,6 +640,7 @@ sub migrate_password_hash($user_ref) { $user_ref->{'encrypted_password'} = create_password_hash(encode_utf8(decode utf8=>param('password')) ); $log->info("crypt password upgraded to scrypt_hash") if $log->is_info(); } + return; } @@ -673,6 +674,7 @@ sub remove_old_sessions($user_ref) { delete $user_ref->{'user_sessions'}{$oldest_session}; } } + return; }