Skip to content

Commit

Permalink
fix: spelling correction (#7141)
Browse files Browse the repository at this point in the history
* fix: spelling correction
* adding return statements
  • Loading branch information
dipietroR authored Jul 26, 2022
1 parent b257ffe commit af59dc1
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 31 deletions.
4 changes: 2 additions & 2 deletions lib/ProductOpener/Ecoscore.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions lib/ProductOpener/Food.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/ProductOpener/FoodGroups.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ProductOpener::Food - functions related to food products and nutrition
=head1 DESCRIPTION
The C<ProductOpener::FoodGroups> 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é").
Expand Down
4 changes: 2 additions & 2 deletions lib/ProductOpener/ForestFootprint.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ C<ProductOpener::Ecoscore> 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

Expand Down Expand Up @@ -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],
Expand Down
2 changes: 1 addition & 1 deletion lib/ProductOpener/GS1.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 10 additions & 10 deletions lib/ProductOpener/Import.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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};
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/ProductOpener/Ingredients.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ProductOpener::Ingredients - process and analyze ingredients lists
C<ProductOpener::Ingredients> 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/;
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/ProductOpener/KnowledgePanels.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ProductOpener/MainCountries.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ProductOpener/Packaging.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ProductOpener/Products.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions lib/ProductOpener/Recipes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions lib/ProductOpener/Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion lib/ProductOpener/Users.pm
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ sub is_admin_user($user_id) {
=head2 check_user_form()
C<check_user_form()> 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

Expand Down Expand Up @@ -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;
}


Expand Down Expand Up @@ -673,6 +674,7 @@ sub remove_old_sessions($user_ref) {
delete $user_ref->{'user_sessions'}{$oldest_session};
}
}
return;
}


Expand Down

0 comments on commit af59dc1

Please sign in to comment.