From 330f1a7cd6545018e846608dbc97bf1bd04c4656 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 6 Oct 2022 15:08:30 +0700 Subject: [PATCH 1/2] Giving lfmerge dev container elevated privileges to allow debugging --- docker/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f809d316d3..c437c2b51d 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -83,6 +83,8 @@ services: args: - ENVIRONMENT=development image: lfmerge + # Elevated privileges needed for debugging (tested in WSL) -- don't use in production + privileged: true container_name: lfmerge platform: linux/amd64 depends_on: From b77f9cb9bce7d2a816638658201821d5a1604a1f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 15 Nov 2022 13:42:43 -0600 Subject: [PATCH 2/2] Updating LF OptionListItem's to use GUID's for keys, instead of the value. This was mostly already being done, but one place in the html (when the field is uneditable) and one in the php (when option list items are constructed without a given key). The LFMerge side is still not working, but there aren't any obvious changes required yet in this repo. --- src/Api/Model/Languageforge/Lexicon/LexOptionListItem.php | 2 +- .../lexicon/editor/field/dc-optionlist.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api/Model/Languageforge/Lexicon/LexOptionListItem.php b/src/Api/Model/Languageforge/Lexicon/LexOptionListItem.php index c645844485..ab661bed11 100644 --- a/src/Api/Model/Languageforge/Lexicon/LexOptionListItem.php +++ b/src/Api/Model/Languageforge/Lexicon/LexOptionListItem.php @@ -21,7 +21,7 @@ public function __construct($value = '', $key = null, $guid = '') if ($guid) $this->guid = $guid; $this->value = $value; if (is_null($key)) { - $this->key = $value; + $this->key = $guid; } else { $this->key = $key; } diff --git a/src/angular-app/languageforge/lexicon/editor/field/dc-optionlist.component.html b/src/angular-app/languageforge/lexicon/editor/field/dc-optionlist.component.html index df0a7787b8..53b80fbb30 100644 --- a/src/angular-app/languageforge/lexicon/editor/field/dc-optionlist.component.html +++ b/src/angular-app/languageforge/lexicon/editor/field/dc-optionlist.component.html @@ -8,7 +8,7 @@ + data-ng-bind="$ctrl.getDisplayName($ctrl.model.key)">