diff --git a/UX-Guide-Metadata/draft/techniques/epub-metadata/index.html b/UX-Guide-Metadata/draft/techniques/epub-metadata/index.html
index 760ca1f1..86332bd1 100755
--- a/UX-Guide-Metadata/draft/techniques/epub-metadata/index.html
+++ b/UX-Guide-Metadata/draft/techniques/epub-metadata/index.html
@@ -164,6 +164,22 @@
Check for Node
ELSE return False
.
+
+ Join array to comma list
+ This function serves to concatenate an array of strings, separating each element with a comma, with the last element separated by an ", and"
(this string is localizable).
+ For example if the input array has elements ["one", "two", "three"]
, then the output is going to be "one, two, and three"
.
+ This algorithm takes the string_array argument: the list of string to join.
+ To join the array, run the following steps:
+
+ - LET output_string be the result of:
+
+ - calling join on string_array with the separator
", "
+ - replacing the last occurrence of
", "
with ", and "
.
+
+
+ - return output_string.
+
+
@@ -638,8 +654,7 @@ Instructions
LET navigation_string be the result of:
- - calling join on navigation with the separator
", "
- - replacing the last occurrence of
", "
with " ,and "
+ - calling join array to comma list given navigation
- concatenating
"Navigation by "
to the beginning of the string.
@@ -837,9 +852,8 @@ Instructions
LET hazards_string be the result of:
- - calling join on hazards with the separator
", "
- - making uppercase the first character
- - replacing the last occurrence of
", "
with " ,and "
+ - calling join array to comma list given hazards
+ - uppercasing the first character
- concatenating
" hazards"
to the end of the string IF (length of hazards) > 1 ELSE concatenating " hazard"
to the end of the string.
@@ -1068,9 +1082,8 @@ Instructions
- LET adaptation_string be the result of:
- - calling join on adaptation with the separator
", "
- - making uppercase the first character
- - replacing the last occurrence of
", "
with " ,and "
.
+ - calling join array to comma list given adaptation
+ - uppercasing the first character.
- display adaptation_string.
@@ -1183,9 +1196,8 @@ Instructions
- LET clarity_string be the result of:
- - calling join on clarity with the separator
", "
- - making uppercase the first character
- - replacing the last occurrence of
", "
with " ,and "
.
+ - calling join array to comma list given clarity
+ - uppercasing the first character.
- display clarity_string.