Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/modules/IDE/components/SketchList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ const SketchList = ({
context: mobile ? 'mobile' : ''
})
)}
{userIsOwner && renderFieldHeader('visibility', 'Visibility')}
{userIsOwner &&
renderFieldHeader('visibility', t('Visibility.Label'))}
<th scope="col"></th>
</tr>
</thead>
Expand Down
11 changes: 7 additions & 4 deletions client/modules/User/components/VisibilityDropdown.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState, useRef, useEffect } from 'react';
import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next';
import LockIcon from '../../../images/lock.svg';
import EarthIcon from '../../../images/earth.svg';
import CheckmarkIcon from '../../../images/checkmark.svg';
Expand All @@ -8,18 +9,20 @@ const VisibilityDropdown = ({ sketch, onVisibilityChange, location }) => {
const [isOpen, setIsOpen] = useState(false);
const dropdownRef = useRef(null);

const { t } = useTranslation();

const visibilityOptions = [
{
value: 'Public',
label: 'Public',
label: t('Visibility.Public.Label'),
icon: <EarthIcon className="visibility-icon" />,
description: 'Anyone can see this sketch'
description: t('Visibility.Public.Description')
},
{
value: 'Private',
label: 'Private',
label: t('Visibility.Private.Label'),
icon: <LockIcon className="visibility-icon" />,
description: 'Only you can see this sketch'
description: t('Visibility.Private.Description')
}
];

Expand Down
11 changes: 11 additions & 0 deletions translations/locales/en-US/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,5 +675,16 @@
},
"SkipLink": {
"PlaySketch": "Skip to Play Sketch"
},
"Visibility": {
"Label": "Visibility",
"Public": {
"Description": "Anyone can see this sketch.",
"Label": "Public"
},
"Private": {
"Description": "Only you can see this sketch.",
"Label": "Private"
}
}
}
11 changes: 11 additions & 0 deletions translations/locales/pt-BR/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -606,5 +606,16 @@
},
"SkipLink": {
"PlaySketch": "Pule para reproduzir o esboço"
},
"Visibility": {
"Label": "Visibilidade",
"Public": {
"Description": "Qualquer um pode ver este esboço.",
"Label": "Público"
},
"Private": {
"Description": "Apenas você pode ver este esboço.",
"Label": "Privado"
}
}
}
Loading