@@ -17,6 +17,14 @@ const Comma = () => {
1717 ) ;
1818} ;
1919
20+ const And = ( { andTranslation } ) => {
21+ return (
22+ < span aria-hidden = "true" >
23+ < Text css = { BylineCss . and } > { ` ${ andTranslation } ` } </ Text >
24+ </ span >
25+ ) ;
26+ } ;
27+
2028const Contributors = ( { contributorValues, isSingleContributor } ) => {
2129 const { translations, dir } = use ( ServiceContext ) ;
2230 const isRtl = dir === 'rtl' ;
@@ -27,6 +35,7 @@ const Contributors = ({ contributorValues, isSingleContributor }) => {
2735 reportingFrom = 'Reporting from' ,
2836 role = 'Role' ,
2937 } = { } ,
38+ and = 'and' ,
3039 } = translations ?? { } ;
3140
3241 const hasMultipleContributors = ! isSingleContributor ;
@@ -54,6 +63,9 @@ const Contributors = ({ contributorValues, isSingleContributor }) => {
5463 role = "list"
5564 key = { authorName }
5665 >
66+ { index === lastContributorIndex && ! isSingleContributor && (
67+ < And andTranslation = { and } />
68+ ) }
5769 { authorImage && isSingleContributor && (
5870 < li
5971 css = { [
@@ -145,7 +157,8 @@ const Contributors = ({ contributorValues, isSingleContributor }) => {
145157 </ span >
146158 { ( location && < Comma /> ) ||
147159 ( hasMultipleContributors &&
148- index !== lastContributorIndex && < Comma /> ) }
160+ index !== lastContributorIndex &&
161+ index !== lastContributorIndex - 1 && < Comma /> ) }
149162 </ li >
150163 ) : null }
151164 { location ? (
@@ -163,9 +176,9 @@ const Contributors = ({ contributorValues, isSingleContributor }) => {
163176 { location }
164177 </ Text >
165178 </ span >
166- { hasMultipleContributors && index !== lastContributorIndex && (
167- < Comma />
168- ) }
179+ { hasMultipleContributors &&
180+ index !== lastContributorIndex &&
181+ index !== lastContributorIndex - 1 && < Comma /> }
169182 </ li >
170183 ) : null }
171184 </ ul >
0 commit comments