Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/typescript-82270dcf6c
Browse files Browse the repository at this point in the history
  • Loading branch information
teolemon authored Sep 25, 2024
2 parents c99c034 + ab6ebb7 commit 1f7c17e
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-per-language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Matrix
uses: crowdin/[email protected].2
uses: crowdin/[email protected].3
with:
upload_translations: false # default is false
download_translations: true
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Crowdin Sync
name: Synchronisation of translations using Crowdin

on:
push:
Expand All @@ -7,13 +7,13 @@ on:

jobs:
synchronize-with-crowdin:
name: Synchronize with Crowdin
name: Synchronisation of translations using Crowdin
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: crowdin action
uses: crowdin/[email protected].2
uses: crowdin/[email protected].3
with:
upload_translations: false # default is false
# Use this option to upload translations for a single specified language
Expand Down Expand Up @@ -44,13 +44,13 @@ jobs:
pull_request_base_branch_name: main
# Create pull request after pushing to branch
# create_pull_request: # default is true
# To add labels for created pull request
pull_request_labels: 'translations'
# The title of the new pull request
pull_request_title: "l10n: New Crowdin translations to review and merge"
pull_request_body: '### What\n- Automated pull request pulling in new or updated translations from Crowdin (https://translate.openfoodfacts.org).\n## Checklist\n- [ ] Check that they are no bad translations. If there are, correct them directly in Crowdin so that they are not resynced again. Then you can correct them here as well, or wait 24 hours for the sync to happen automatically.\n- [ ] Put extra attention on Acholi, which is used mistakenly as a sandbox by people discovering the self-service translation button on Open Food Facts\n- [ ] Once you are happy, that automated checks pass, you can approve the PR and merge it.\n### Part of\n- Translations'
pull_request_body: '### What\n> [!IMPORTANT]\n> This is a Crowdin generated PR\n- Automated pull request pulling in new or updated translations from Crowdin (https://translate.openfoodfacts.org).\n## Checklist\n- [ ] Check that they are no bad translations. If there are, correct them directly in Crowdin so that they are not resynced again. Then you can correct them here as well, or wait 24 hours for the sync to happen automatically.\n- [ ] Put extra attention on Acholi, which is used mistakenly as a sandbox by people discovering the self-service translation button on Open Food Facts\n- [ ] Once you are happy, that automated checks pass, you can approve the PR and merge it.\n### Part of\n- Translations'
# The contents of the pull request
# pull_request_body: # optional
# To add labels for created pull request
pull_request_labels: "translations"
# Create pull request to specified branch instead of default one
# pull_request_base_branch_name: # optional
# Option to upload or download files to the specified version branch in your Crowdin project
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ARG USER_UID=1000
ARG USER_GID=1000

FROM node:22.8.0 AS builder
FROM node:22.9.0 AS builder
ARG USER_UID
ARG USER_GID
RUN usermod --uid $USER_UID node && \
Expand Down
8 changes: 4 additions & 4 deletions conf/obf-log.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
log4perl.rootLogger=ERROR, LOGFILE
log4perl.logger.mongodb=INFO, MONGODB_LOGFILE
log4perl.rootLogger=FATAL, LOGFILE
log4perl.logger.mongodb=FATAL, MONGODB_LOGFILE
log4perl.logger.ratelimiter=INFO, RATELIMITER_LOGFILE
log4perl.logger.requeststats=INFO, REQUESTSTATS_LOGFILE
log4perl.logger.requeststats=FATAL, REQUESTSTATS_LOGFILE

log4perl.PatternLayout.cspec.S = sub { my $context = Log::Log4perl::MDC->get_context; use Data::Dumper (); local $Data::Dumper::Indent = 0; local $Data::Dumper::Terse = 1; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Quotekeys = 0; local $Data::Dumper::Deparse = 1; my $str = Data::Dumper::Dumper($context); $str =~ s/[\n\r]/ /g; return $str; }
log4perl.PatternLayout.cspec.J = sub { my $context = Log::Log4perl::MDC->get_context; use JSON::MaybeXS; my $json_utf8 = JSON::MaybeXS->new->utf8(1)->allow_nonref->canonical; my $str = $json_utf8->encode($context); return $str; }
Expand Down Expand Up @@ -32,4 +32,4 @@ log4perl.appender.REQUESTSTATS_LOGFILE.filename=/srv/obf/logs/requeststats_log4p
log4perl.appender.REQUESTSTATS_LOGFILE.mode=append
log4perl.appender.REQUESTSTATS_LOGFILE.autoflush=1
log4perl.appender.REQUESTSTATS_LOGFILE.layout=PatternLayout
log4perl.appender.REQUESTSTATS_LOGFILE.layout.ConversionPattern=%J %n
log4perl.appender.REQUESTSTATS_LOGFILE.layout.ConversionPattern=%J %n
6 changes: 3 additions & 3 deletions conf/off-log.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
log4perl.rootLogger=ERROR, LOGFILE
log4perl.logger.mongodb=INFO, MONGODB_LOGFILE
log4perl.rootLogger=FATAL, LOGFILE
log4perl.logger.mongodb=FATAL, MONGODB_LOGFILE
log4perl.logger.ratelimiter=INFO, RATELIMITER_LOGFILE
log4perl.logger.requeststats=INFO, REQUESTSTATS_LOGFILE
log4perl.logger.requeststats=FATAL, REQUESTSTATS_LOGFILE

log4perl.PatternLayout.cspec.S = sub { my $context = Log::Log4perl::MDC->get_context; use Data::Dumper (); local $Data::Dumper::Indent = 0; local $Data::Dumper::Terse = 1; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Quotekeys = 0; local $Data::Dumper::Deparse = 1; my $str = Data::Dumper::Dumper($context); $str =~ s/[\n\r]/ /g; return $str; }
log4perl.PatternLayout.cspec.J = sub { my $context = Log::Log4perl::MDC->get_context; use JSON::MaybeXS; my $json_utf8 = JSON::MaybeXS->new->utf8(1)->allow_nonref->canonical; my $str = $json_utf8->encode($context); return $str; }
Expand Down
2 changes: 1 addition & 1 deletion conf/off-pro-log.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
log4perl.rootLogger=DEBUG, LOGFILE
log4perl.rootLogger=FATAL, LOGFILE

log4perl.PatternLayout.cspec.S = sub { my $context = Log::Log4perl::MDC->get_context; use Data::Dumper (); local $Data::Dumper::Indent = 0; local $Data::Dumper::Terse = 1; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Quotekeys = 0; local $Data::Dumper::Deparse = 1; my $str = Data::Dumper::Dumper($context); $str =~ s/[\n\r]/ /g; return $str; }

Expand Down
6 changes: 3 additions & 3 deletions conf/opf-log.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
log4perl.rootLogger=ERROR, LOGFILE
log4perl.rootLogger=FATAL, LOGFILE
log4perl.logger.mongodb=INFO, MONGODB_LOGFILE
log4perl.logger.ratelimiter=INFO, RATELIMITER_LOGFILE
log4perl.logger.requeststats=INFO, REQUESTSTATS_LOGFILE
log4perl.logger.ratelimiter=FATAL, RATELIMITER_LOGFILE
log4perl.logger.requeststats=FATAL, REQUESTSTATS_LOGFILE

log4perl.PatternLayout.cspec.S = sub { my $context = Log::Log4perl::MDC->get_context; use Data::Dumper (); local $Data::Dumper::Indent = 0; local $Data::Dumper::Terse = 1; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Quotekeys = 0; local $Data::Dumper::Deparse = 1; my $str = Data::Dumper::Dumper($context); $str =~ s/[\n\r]/ /g; return $str; }
log4perl.PatternLayout.cspec.J = sub { my $context = Log::Log4perl::MDC->get_context; use JSON::MaybeXS; my $json_utf8 = JSON::MaybeXS->new->utf8(1)->allow_nonref->canonical; my $str = $json_utf8->encode($context); return $str; }
Expand Down
6 changes: 3 additions & 3 deletions conf/opff-log.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
log4perl.rootLogger=ERROR, LOGFILE
log4perl.logger.mongodb=INFO, MONGODB_LOGFILE
log4perl.rootLogger=FATAL, LOGFILE
log4perl.logger.mongodb=FATAL, MONGODB_LOGFILE
log4perl.logger.ratelimiter=INFO, RATELIMITER_LOGFILE
log4perl.logger.requeststats=INFO, REQUESTSTATS_LOGFILE
log4perl.logger.requeststats=FATAL, REQUESTSTATS_LOGFILE

log4perl.PatternLayout.cspec.S = sub { my $context = Log::Log4perl::MDC->get_context; use Data::Dumper (); local $Data::Dumper::Indent = 0; local $Data::Dumper::Terse = 1; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Quotekeys = 0; local $Data::Dumper::Deparse = 1; my $str = Data::Dumper::Dumper($context); $str =~ s/[\n\r]/ /g; return $str; }
log4perl.PatternLayout.cspec.J = sub { my $context = Log::Log4perl::MDC->get_context; use JSON::MaybeXS; my $json_utf8 = JSON::MaybeXS->new->utf8(1)->allow_nonref->canonical; my $str = $json_utf8->encode($context); return $str; }
Expand Down
60 changes: 35 additions & 25 deletions html/js/folksonomy.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ function folskonomy_engine_init() {
function displayFolksonomyPropertyValues() {
//$(".details").before(
$("div#main-product").append(
String('<!-- ---- Folksonomy Engine ----- -->' +
String('<!-- ---- Folksonomy Engine panel ----- -->' +
'<section class="row">' +
'<div id="free_properties_1" class="feus row card ">' +
'<div class="column large-12 h-space-tiny ">' +
'<div class="column large-12 h-space-tiny ">' +
'<h2>Personalized properties (<span data-tooltip aria-haspopup="true" class="has-tip" data-position="top" data-alignment="left" title="Be aware the data model might be modified. Use at your own risk.">beta</span>)</h2>' +
'<p id="fe_login_info"></p>' +
"<p>These properties are created and filed by users for any kind of usages. Feel free to add your own. " +
Expand All @@ -165,14 +166,15 @@ function displayFolksonomyPropertyValues() {
'<table>' +
'<tr>' +
'<th> </th>' +
'<th class="prop_title">Property <a href="/properties">🔗</a></th>' +
'<th class="prop_title">Property <a href="https://wiki.openfoodfacts.org/Folksonomy/Property">🛈</a></th>' +
'<th class="val_title">Value</th>' +
'</tr>' +
'<tbody id="free_prop_body">') +
'</tbody>' +
'<!-- ---- New row ---- -->' +
'<tr id="fe_new_row">' +
'<td><input type="hidden" name="owner"> </td>' +
'<td id="fe_form_new_property_doc"></td>' +
'<td>' +
'<input id="fe_form_new_property" name="property" class="text tagify-me" value="" lang="en" placeholder="Enter a property" ></input>' +
'<small id="fe_prop_eg" >Example: color</small>' +
Expand All @@ -188,6 +190,7 @@ function displayFolksonomyPropertyValues() {
'</form>' +
'</div>' +
'</div>' +
'</section>' +
'<!-- ----- /Folksonomy Engine ----- -->');


Expand Down Expand Up @@ -324,10 +327,11 @@ function displayFolksonomyPropertyValues() {
while (index--) {
content += ('<tr>' +
'<td class="version" data-version="' + d[index].version + '"> </td>' +
'<td><a href="https://wiki.openfoodfacts.org/Folksonomy/Property/'+d[index].k+'">🛈</a></td>' +
'<td class="property"><a href="/property/' + d[index].k + '">' + d[index].k + '</a></td>' +
'<td class="value"><a href="/property/' + d[index].k + '/value/' + d[index].v +'">' + d[index].v + '</a></td>' +
'<td>'+
'<span class="button tiny fe_save_kv" style="display: none">save</span> '+
'<span class="button tiny fe_save_kv" style="display: none">Save</span> '+
'<span class="button tiny fe_edit_kv">Edit</span> '+
'<span class="button tiny fe_del_kv">Delete</span>'+
'</td>' +
Expand Down Expand Up @@ -358,12 +362,12 @@ function displayProductsWithProperty(_property, _value) {
*/
//$("#main_column p").remove(); // remove <p>Invalid address.</p>
$("#main_column").append('<!-- display products with property ' + _property + (_value ? ": "+ _value : '') + ' -->' +
'<h2 id="property_title">Property: '+ _property + (_value ? ": "+ _value : '') + '</h2>' +
'<p>You should find a <a href="https://wiki.openfoodfacts.org/Folksonomy/Property/'+ _property + '">dedicated documentation</a>' +
' about this property on Open Food Facts wiki</p>' +
'<p>List of products using this property:</p>' +
'<div id="fe_infobox" style="float: right; border: solid black; width: 20%">Tip: you can also find the <a href="/properties">list of all properties</a>.</div>' +
'<ul id="product_list"></ul>');
'<h2 id="property_title">Folksonomy property: '+ _property + (_value ? ": "+ _value : '') + '</h2>' +
'<p>You should find a <a href="https://wiki.openfoodfacts.org/Folksonomy/Property/'+ _property + '">dedicated documentation</a>' +
' about this property on Open Food Facts wiki</p>' +
'<p>List of products using this property:</p>' +
'<div id="fe_infobox" style="float: right; border: solid black; width: 20%">Tip: you can also find the <a href="/properties">list of all properties</a>.</div>' +
'<ul id="product_list"></ul>');
//$("#main_column h1").remove(); // remove <h1>Error</h1>

console.log("FEUS - displayProductsWithProperty(_property) - GET " + feAPI + "/products?k=" + _property + (_value ? "&v="+ _value : ''));
Expand All @@ -376,8 +380,8 @@ function displayProductsWithProperty(_property, _value) {
content +=
'<table id="properties_list">' +
'<tr>' +
'<th class="product_code">Code</th>' +
'<th class="values">Values</th>' +
'<th class="product_code">Product barcode</th>' +
'<th class="values">Corresponding value</th>' +
'</tr>' +
'<tbody id="free_prop_body">';
while (index--) {
Expand Down Expand Up @@ -407,20 +411,26 @@ function displayAllProperties() {
*/
// TODO: add owner filter?
//$("#main_column p").remove(); // remove <p>Invalid address.</p>

// Display empty table
$("#main_column").append(String('<h2 id="property_title">Properties</h2>' +
'<p>List of all properties.</p>' +
'<table id="properties_list">' +
'<tr>' +
'<th> </th>' +
'<th class="property_name">Property</th>' +
'<th class="count">Count</th>' +
'<th class="values">Values</th>' +
'<th class="doc">Documentation</th>' +
'</tr>' +
'<tbody id="free_prop_body">') +
'</tbody>' +
'</table>');
"<p>Open Food Facts allows anyone to reuse contributed properties or create new ones " +
"(see the <a href='https://wiki.openfoodfacts.org/Folksonomy_Engine'>Folksonomy Engine project</a>). " +
"Here's the list of all contributed properties.</p>" +
'<table id="properties_list">' +
'<tr>' +
'<th> </th>' +
'<th class="property_name">Property</th>' +
'<th class="doc">Documentation</th>' +
'<th class="count">Count</th>' +
'<th class="values">Values</th>' +
'</tr>' +
'<tbody id="free_prop_body">') +
'</tbody>' +
'</table>');
//$("#main_column h1").remove(); // remove <h1>Error</h1>

// Populate table
console.log("FEUS - displayAllProperties(_owner) - GET " + feAPI + "/keys");
$.getJSON(feAPI + "/keys", function(data) {
console.log("FEUS - displayAllProperties() - " + JSON.stringify(data));
Expand All @@ -432,9 +442,9 @@ function displayAllProperties() {
content += ('<tr class="property">' +
'<td> </td>' +
'<td><a href="/property/'+ d[index].k + '">' + d[index].k + '</a></td>' +
'<td><a href="https://wiki.openfoodfacts.org/Folksonomy/Property/' + d[index].k + '">🛈</a></td>' +
'<td>' + d[index].count + '</td>' +
'<td>' + d[index].values + '</td>' +
'<td><a href="https://wiki.openfoodfacts.org/Folksonomy/Property/' + d[index].k + '">🔗</a></td>' +
'</tr>');
}
$("#properties_list").append(content);
Expand Down
2 changes: 1 addition & 1 deletion taxonomies/packaging_materials.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3214,8 +3214,8 @@ web:en: https://www.elopak.com/range-of-ambient-packages/
< en:Pure-Pak
en: Pure-Pak Sense Aseptic, PurePak Sense Aseptic
xx: Pure-Pak Sense Aseptic, PurePak Sense Aseptic
web:https://www.elopak.com/pure-pak-sense-aseptic-3/
description:en: drink carton for milk, milk alternatives and juice
web:en: https://www.elopak.com/pure-pak-sense-aseptic-3/

< en:Pure-Pak
en: Pure-Pak eSense, PurePak eSense
Expand Down

0 comments on commit 1f7c17e

Please sign in to comment.