diff --git a/account/__init__.py b/account/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/account/admin.py b/account/admin.py
new file mode 100644
index 0000000000..8c38f3f3da
--- /dev/null
+++ b/account/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/account/apps.py b/account/apps.py
new file mode 100644
index 0000000000..12e91a85a8
--- /dev/null
+++ b/account/apps.py
@@ -0,0 +1,7 @@
+from django.apps import AppConfig
+
+class AccountsConfig(AppConfig):
+ name = 'account' # The name of your app
+
+ # def ready(self):
+ # import account.signal # Import the signals
\ No newline at end of file
diff --git a/account/migrations/0001_initial.py b/account/migrations/0001_initial.py
new file mode 100644
index 0000000000..d13f678745
--- /dev/null
+++ b/account/migrations/0001_initial.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.29 on 2024-09-18 12:44
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='UserType',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('user_type', models.CharField(choices=[('Monastic', 'Monastic'), ('Teacher', 'Teacher'), ('Student', 'Student'), ('Educated* /Dr / Prof', 'Educated* /Dr / Prof'), ('regular user', 'regular user')], max_length=20)),
+ ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
+ ],
+ ),
+ ]
diff --git a/account/migrations/__init__.py b/account/migrations/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/account/models.py b/account/models.py
new file mode 100644
index 0000000000..0d8d93bbd2
--- /dev/null
+++ b/account/models.py
@@ -0,0 +1,19 @@
+from django.db import models
+
+from django.contrib.auth.models import User
+
+
+class UserType(models.Model):
+ USER_TYPE_CHOICES = [
+ ('Monastic', 'Monastic'),
+ ('Teacher', 'Teacher'),
+ ('Student', 'Student'),
+ ('Educated* /Dr / Prof', 'Educated* /Dr / Prof'),
+ ('regular user', 'regular user'),
+ ]
+
+ user = models.OneToOneField(User, on_delete=models.CASCADE)
+ user_type = models.CharField(max_length=20, choices=USER_TYPE_CHOICES)
+
+ def __str__(self):
+ return f"{self.user.username} - {self.user_type}"
\ No newline at end of file
diff --git a/account/signal.py b/account/signal.py
new file mode 100644
index 0000000000..fc7dd4d9c2
--- /dev/null
+++ b/account/signal.py
@@ -0,0 +1,17 @@
+# from django.db.models.signals import post_save
+# from django.dispatch import receiver
+# from django.contrib.auth.models import User
+# from .models import UserType
+
+# # Automatically create a user profile when a new User is created
+# @receiver(post_save, sender=User)
+# def create_user_profile(sender, instance, created, **kwargs):
+# if created:
+# print("UserType created for the new user")
+# UserType.objects.create(user=instance)
+
+# # Automatically save the user profile when the User is saved
+# @receiver(post_save, sender=User)
+# def save_user_profile(sender, instance, **kwargs):
+# if hasattr(instance, 'usertype'): # Check if user has an associated UserType
+# instance.usertype.save()
\ No newline at end of file
diff --git a/account/tests.py b/account/tests.py
new file mode 100644
index 0000000000..7ce503c2dd
--- /dev/null
+++ b/account/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/account/views.py b/account/views.py
new file mode 100644
index 0000000000..91ea44a218
--- /dev/null
+++ b/account/views.py
@@ -0,0 +1,3 @@
+from django.shortcuts import render
+
+# Create your views here.
diff --git a/reader/views.py b/reader/views.py
index 2888563513..f5cbdefb43 100644
--- a/reader/views.py
+++ b/reader/views.py
@@ -87,6 +87,10 @@
from sefaria.helper.topic import update_topic, update_topic_titles
from sefaria.helper.category import update_order_of_category_children, check_term
from redis_clear import clear_redis_cache
+from django.middleware.csrf import get_token
+from django.utils.text import slugify
+import random
+import string
if USE_VARNISH:
from sefaria.system.varnish.wrapper import invalidate_ref, invalidate_linked
@@ -3984,6 +3988,11 @@ def edit_profile(request):
Page for editing a user's profile.
"""
profile = UserProfile(id=request.user.id)
+ if not profile.slug:
+ profile.slug = slugify(request.user.username) or generate_random_slug()
+ while db.profiles.find_one({"slug": profile.slug, "_id": {"$ne": profile.id}}):
+ profile.slug = generate_random_slug()
+ profile.save()
sheets = db.sheets.find({"owner": profile.id, "status": "public"}, {"id": 1, "datePublished": 1}).sort(
[["datePublished", -1]])
return render_template(request, 'edit_profile.html', None, {
@@ -3992,6 +4001,41 @@ def edit_profile(request):
'sheets': sheets,
})
+def generate_random_slug(length=8):
+ """
+ Generates a random slug in case the username slug conflicts or is empty.
+ """
+ letters = string.ascii_lowercase + string.digits
+ return ''.join(random.choice(letters) for i in range(length))
+
+
+# @login_required
+# @ensure_csrf_cookie
+# def edit_profile(request):
+# """
+# Page for editing a user's profile.
+# """
+# # Fetch the user's profile
+# profile = UserProfile(id=request.user.id)
+
+# # Check if slug is empty or None, and generate a default slug if needed
+# if not profile.slug:
+# # Generate a default slug using the username
+# profile.slug = slugify(request.user.username)
+# # Save the profile with the new slug
+# profile.save()
+
+# # Get public sheets owned by the user
+# sheets = db.sheets.find({"owner": profile.id, "status": "public"}, {"id": 1, "datePublished": 1}).sort(
+# [["datePublished", -1]])
+
+# # Render the edit profile page
+# return render(request, 'edit_profile.html', {
+# 'user': request.user,
+# 'profile': profile,
+# 'sheets': sheets,
+# 'csrf_token': get_token(request), # ensure CSRF token is available in the context
+# })
@login_required
@ensure_csrf_cookie
diff --git a/sefaria/forms.py b/sefaria/forms.py
index e7e9f64ea7..b204598ec8 100644
--- a/sefaria/forms.py
+++ b/sefaria/forms.py
@@ -16,6 +16,8 @@
from emailusernames.utils import get_user, user_exists
from captcha.fields import ReCaptchaField
from captcha.widgets import ReCaptchaV2Checkbox
+from account.models import UserType
+
from sefaria.helper.crm.crm_mediator import CrmMediator
from sefaria.settings import DEBUG
@@ -49,6 +51,21 @@ class SefariaNewUserForm(EmailUserCreationForm):
# subscribe_educator = forms.BooleanField(label=_("I am an educator"), help_text=_("I am an educator"), initial=False,
# required=False)
+ CHOICES = [
+ ('', _('Select an option...')),
+ ('Monastic', _('Monastic')),
+ ('Teacher', _('Teacher')),
+ ('Student', _('Student')),
+ ('Educated* /Dr / Prof', _('Educated* /Dr / Prof')),
+ ('regular user', _('regular user')),
+ ]
+
+ # Add the select field
+ user_type = forms.ChoiceField(
+ choices=CHOICES,
+ widget=forms.Select(attrs={'placeholder': _("Select an Option")})
+ )
+
captcha_lang = "iw" if get_language() == 'he' else "en"
captcha = ReCaptchaField(
widget=ReCaptchaV2Checkbox(
@@ -67,7 +84,7 @@ class Meta:
def __init__(self, *args, **kwargs):
super(EmailUserCreationForm, self).__init__(*args, **kwargs)
del self.fields['password2']
- self.fields.keyOrder = ["email", "first_name", "last_name", "password1", "captcha"]
+ self.fields.keyOrder = ["email", "first_name", "last_name", "password1", "captcha", ]
self.fields.keyOrder.append("subscribe_educator")
def clean_email(self):
@@ -94,6 +111,10 @@ def save(self, commit=True):
if commit:
user.save()
+
+ # Save user_type in UserType model
+ user_type = self.cleaned_data['user_type']
+ UserType.objects.create(user=user, user_type=user_type)
try:
crm_mediator = CrmMediator()
@@ -102,6 +123,7 @@ def save(self, commit=True):
educator=self.cleaned_data["subscribe_educator"])
except Exception as e:
logger.error(f"failed to add user to CRM: {e}")
+
return user
diff --git a/sefaria/model/user_profile.py b/sefaria/model/user_profile.py
index 5571c0cfb2..091704a0d1 100644
--- a/sefaria/model/user_profile.py
+++ b/sefaria/model/user_profile.py
@@ -528,7 +528,7 @@ def errors(self):
existing = db.profiles.find_one({"slug": self.slug, "_id": {"$ne": self._id}})
if existing:
- return "The Profile URL you have requested is already in use."
+ return "Profile URL cannot be empty."
# URL Fields: website, facebook, linkedin
url_val = URLValidator()
try:
diff --git a/sefaria/settings.py b/sefaria/settings.py
index 3b5cb4b553..ece15b11cc 100644
--- a/sefaria/settings.py
+++ b/sefaria/settings.py
@@ -16,6 +16,12 @@
# system time zone.
TIME_ZONE = 'America/Halifax'
+# ElasticSearch server
+# URL to connect to ES server.
+# Set this to https://sefaria.org/api/search to connect to production search.
+# If ElasticSearch server has a password use the following format: http(s)://{username}:{password}@{base_url}
+SEARCH_URL = "http://localhost:9200"
+
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'es'
@@ -64,7 +70,9 @@
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
+BASE_DIR = os.path.dirname(os.path.dirname(__file__))
STATIC_URL = '/static/'
+STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
# List of finder classes that know how to find static files in
# various locations.
@@ -156,6 +164,7 @@
'reader',
'sourcesheets',
'sefaria.gauth',
+ 'account',
'captcha',
'django.contrib.admin',
'anymail',
diff --git a/static/css/s2.css b/static/css/s2.css
index 15c951b6fb..50a9a4b4a1 100644
--- a/static/css/s2.css
+++ b/static/css/s2.css
@@ -5953,8 +5953,8 @@ body .ui-autocomplete.dictionary-toc-autocomplete .ui-menu-item a.ui-state-focus
.readerControls .readerTextToc .readerTextTocBox a div {
white-space: nowrap;
text-overflow: ellipsis;
- overflow: hidden;
max-width: 100%;
+ padding: 2px 2px;
}
.readerControls .readerTextToc .readerTextVersion {
diff --git a/static/css/static.css b/static/css/static.css
index d21c604061..dec0b40dc6 100644
--- a/static/css/static.css
+++ b/static/css/static.css
@@ -554,6 +554,14 @@
width: 100%;
box-sizing: border-box;
}
+.registrationContent select option {
+ padding: 12px 20px;
+ height: initial;
+ margin: 1% 0px;
+ cursor: pointer;
+ width: 100%;
+ box-sizing: border-box;
+}
.registrationContent input::placeholder { /* eventual spec? */
font-family: "Heebo", "Roboto", "Helvetica Neue", "Helvetica", sans-serif;
}
diff --git a/static/icons/manifest.json b/static/icons/manifest.json
index 2c54899608..bef90aa87a 100644
--- a/static/icons/manifest.json
+++ b/static/icons/manifest.json
@@ -1,5 +1,5 @@
{
- "name": "Sefaria Web",
+ "name": "Pecha Web",
"icons": [
{
"src": "/favicon-pecha.png?v=xQzLlLp7oR",
diff --git a/static/js/AboutBox.jsx b/static/js/AboutBox.jsx
index 0c16669150..608df7484c 100644
--- a/static/js/AboutBox.jsx
+++ b/static/js/AboutBox.jsx
@@ -89,7 +89,7 @@ class AboutBox extends Component {
- )
+ )
}
return ;
}
@@ -102,7 +102,7 @@ class AboutBox extends Component {
const no_source_versions = multiple_translations || translationVersions?.length === 1 && !sourceVersion;
const sourceVersionSectionTitle = {en: Sefaria._("text.current_version"), he:Sefaria._("text.current_version")};
const translationVersionsSectionTitle = multiple_translations ? {en: Sefaria._("text.current_translation"), he:Sefaria._("text.current_translation")} : {en: Sefaria._("text.current_translation"), he: Sefaria._("text.current_translation")};
- const alternateVersionsSectionTitle = no_source_versions ? {en: Sefaria._("source_versions"), he: Sefaria._("source_versions")} : {en: Sefaria._("alt_source_versions"), he: Sefaria._("alt_source_versions")}
+ const alternateVersionsSectionTitle = no_source_versions ? {en: Sefaria._("text.version.source_versions"), he: Sefaria._("text.version.source_versions")} : {en: Sefaria._("text.version.alt_source_versions"), he: Sefaria._("text.version.alt_source_versions")}
let detailSection = null;
if (d) {
diff --git a/static/js/AboutSheet.jsx b/static/js/AboutSheet.jsx
index 33a4de1601..fec48e9af6 100644
--- a/static/js/AboutSheet.jsx
+++ b/static/js/AboutSheet.jsx
@@ -53,7 +53,7 @@ const AboutSheet = ({ masterPanelSheetId, toggleSignUpModal }) => {
const newSummary = event.target.value
if (event.target.value.length > 280) {
setValidation({
- validationMsg: Sefaria._("summary_limit"),
+ validationMsg: Sefaria._("sheet.message.summary_limit"),
validationFailed: "summary"
});
}
@@ -241,7 +241,7 @@ const AboutSheet = ({ masterPanelSheetId, toggleSignUpModal }) => {
tags={tags}
suggestions={suggestions}
onDelete={onTagDelete}
- placeholderText={Sefaria._("add_topic")}
+ placeholderText={Sefaria._("sheet.placeholder.add_topic")}
delimiters={["Enter", "Tab", ","]}
onAddition={onTagAddition}
onValidate={onTagValidate}
@@ -262,7 +262,7 @@ const AboutSheet = ({ masterPanelSheetId, toggleSignUpModal }) => {
- {Sefaria._("sheet.your_sheet_is")}{ Sefaria._("published")} { Sefaria._("topic.visible_to_other")}
+ {Sefaria._("sheet.your_sheet_is")}{ Sefaria._("sheet.published")} { Sefaria._("topic.visible_to_other")}
diff --git a/static/js/AddToSourceSheet.jsx b/static/js/AddToSourceSheet.jsx
index 193129b20c..bce1319083 100644
--- a/static/js/AddToSourceSheet.jsx
+++ b/static/js/AddToSourceSheet.jsx
@@ -178,8 +178,8 @@ class AddToSourceSheetBox extends Component {
disallowedTagsMode: 'discard',
});
let titleRetval = {
- "en": `${sheetTitle} ${Sefaria._("section")}${nodeID}`,
- "he": `${sheetTitle} ${Sefaria._("section")}${nodeID}`
+ "en": `${sheetTitle} ${Sefaria._("sheet.source_sheet.make_ref.section")}${nodeID}`,
+ "he": `${sheetTitle} ${Sefaria._("sheet.source_sheet.make_ref.section")}${nodeID}`
}
if (refTitles){ //show the refs also of a source, just to be nice
titleRetval["en"] += `(${refTitles["en"]})`;
@@ -231,7 +231,7 @@ class AddToSourceSheetBox extends Component {
@@ -304,7 +304,7 @@ class AddToSourceSheetWindow extends Component {
diff --git a/static/js/BookPage.jsx b/static/js/BookPage.jsx
index d1ff2e48f2..72c389fc47 100644
--- a/static/js/BookPage.jsx
+++ b/static/js/BookPage.jsx
@@ -31,6 +31,7 @@ import {ContentLanguageContext} from './context';
import Hebrew from './sefaria/hebrew.js';
import ReactTags from 'react-tag-autocomplete';
+import { propTypes } from 'react-markdown';
@@ -194,7 +195,7 @@ class BookPage extends Component {
text.start_reading
const tabs = []
- if (this.state.isContentVisible) {
+ if (this.state.isContentVisible || this.props.isNarrowColumn) {
tabs.push({id: "contents", title: {en: Sefaria._("text.contents"), he: Sefaria._("text.contents")}});
}
@@ -311,7 +312,7 @@ class BookPage extends Component {
setTab={this.props.setTab}
renderTab={renderTab}
containerClasses={"largeTabs"}>
- {this.state.isContentVisible? {
@@ -272,7 +272,7 @@ class CollectionPage extends Component {
renderItem={this.renderSheet}
renderEmptyList={this.renderEmptyList}
renderFooter={this.renderSearchLink}
- sortOptions={[Sefaria._("filter_list.recent"),Sefaria._("filter_list.alphabetical") , Sefaria._("profile.tab.sheet.tag.views") ]}
+ sortOptions={[Sefaria._("common.filter_list.recent"),Sefaria._("collection.filter_list.alphabetical") , Sefaria._("profile.tab.sheet.tag.views") ]}
data={sheets}
containerClass={"sheetList"}
scrollableElement={this.scrollableRef}
@@ -639,22 +639,22 @@ class CollectionMemberListingActions extends Component {
: null}
{this.props.isAdmin || this.props.isSelf ?
- {this.props.isSelf ? Sefaria._("collection.leave_collection"): Sefaria._("remove")}
+ {this.props.isSelf ? "collection.leave_collection": "collection.remove"}
: null }
{this.props.isInvitation && !this.state.invitationResent ?
- {Sefaria._("collection.resend_invitation")}
+ collection.resend_invitation
: null}
{this.props.isInvitation && this.state.invitationResent ?
- {Sefaria._("collection.invitation_resent" )}
+ collection.invitation_resent
: null}
{this.props.isInvitation ?
- { Sefaria._("remove")}
+ collection.remove
: null}
diff --git a/static/js/CollectionsWidget.jsx b/static/js/CollectionsWidget.jsx
index af5c1a188e..20fc17744d 100644
--- a/static/js/CollectionsWidget.jsx
+++ b/static/js/CollectionsWidget.jsx
@@ -147,7 +147,7 @@ const CollectionsWidget = ({sheetID, close, handleCollectionsChange}) => {
{newName.length ?
- {Sefaria._("Create")}
+ {Sefaria._("common.create")}
: null}
diff --git a/static/js/CommunityPage.jsx b/static/js/CommunityPage.jsx
index 6c7c6bf14e..566c454e7b 100644
--- a/static/js/CommunityPage.jsx
+++ b/static/js/CommunityPage.jsx
@@ -110,7 +110,7 @@ const RecentlyPublished = ({multiPanel, toggleSignUpModal}) => {
recentSheetsContent.splice(6, 0, joinTheConversation);
recentSheetsContent.push(
- { Sefaria._("load_more")}
+ { Sefaria._("common.load_more")}
);
}
diff --git a/static/js/ComparePanelHeader.jsx b/static/js/ComparePanelHeader.jsx
index 12fd6a4f58..f09ed64621 100644
--- a/static/js/ComparePanelHeader.jsx
+++ b/static/js/ComparePanelHeader.jsx
@@ -27,7 +27,7 @@ const ComparePanelHeader = ({ search, category, openDisplaySettings, navHome, ca
setQuery(e.target.value)} value={query}
onKeyUp={handleSearchKeyUp}
/>
diff --git a/static/js/ConnectionFilters.jsx b/static/js/ConnectionFilters.jsx
index f37a939625..1c38d69dae 100644
--- a/static/js/ConnectionFilters.jsx
+++ b/static/js/ConnectionFilters.jsx
@@ -59,7 +59,7 @@ class CategoryFilter extends Component {
-
+
({this.props.count})
diff --git a/static/js/ConnectionsPanel.jsx b/static/js/ConnectionsPanel.jsx
index a3f461e579..35527260ec 100644
--- a/static/js/ConnectionsPanel.jsx
+++ b/static/js/ConnectionsPanel.jsx
@@ -337,8 +337,8 @@ class ConnectionsPanel extends Component {
this.props.setConnectionsMode("About")} />
this.props.setConnectionsMode("Navigation")} />
- this.props.setConnectionsMode("SidebarSearch")} />
- this.props.setConnectionsMode("Translations")} count={resourcesButtonCounts.translations} />
+ this.props.setConnectionsMode("SidebarSearch")} />
+ this.props.setConnectionsMode("Translations")} count={resourcesButtonCounts.translations} />
}
{showConnectionSummary ?
@@ -369,8 +369,8 @@ class ConnectionsPanel extends Component {
// looked at
(this.props.masterPanelMode === "Sheet" && this.props.title !== "Sheet") ?
<>
- this.props.setConnectionsMode("About")} />
- this.props.setConnectionsMode("Translations")} />
+ this.props.setConnectionsMode("About")} />
+ this.props.setConnectionsMode("Translations")} />
>
:
null
@@ -383,7 +383,7 @@ class ConnectionsPanel extends Component {
:
null
}
-
+
{this.props.masterPanelMode === "Sheet" ? {
return (
setConnectionsMode("Sheets")} />
- setConnectionsMode("WebPages")} />
+ setConnectionsMode("WebPages")} />
setConnectionsMode("Topics")} alwaysShow={Sefaria.is_moderator} />
- setConnectionsMode("manuscripts")} />
- setConnectionsMode("Torah Readings")} />
+ setConnectionsMode("manuscripts")} />
+ setConnectionsMode("Torah Readings")} />
);
}
@@ -751,12 +751,12 @@ const ToolsList = ({ setConnectionsMode, toggleSignUpModal, openComparePanel, co
return (
!Sefaria._uid ? toggleSignUpModal(SignUpModalKind.AddToSheet) : setConnectionsMode("Add To Sheet", { "addSource": "mainPanel" })} />
- {/* setConnectionsMode("Lexicon")} /> */}
- {/* {openComparePanel ? : null} */}
- !Sefaria._uid ? toggleSignUpModal(SignUpModalKind.Notes) : setConnectionsMode("Notes")} />
- {masterPanelMode !== "Sheet" ? setConnectionsMode("Share")} /> : null}
- {/* setConnectionsMode("Feedback")} /> */}
- {/* setConnectionsMode("Advanced Tools")} /> */}
+ {/* setConnectionsMode("Lexicon")} /> */}
+ {openComparePanel ? : null}
+ !Sefaria._uid ? toggleSignUpModal(SignUpModalKind.Notes) : setConnectionsMode("Notes")} />
+ {masterPanelMode !== "Sheet" ? setConnectionsMode("Share")} /> : null}
+ {/* setConnectionsMode("Feedback")} /> */}
+ {/* setConnectionsMode("Advanced Tools")} /> */}
);
}
@@ -785,7 +785,7 @@ const AboutSheetButtons = ({ setConnectionsMode, masterPanelSheetId }) => {
return (
{isOwner ?
- setConnectionsMode("AboutSheet")} />
+ setConnectionsMode("AboutSheet")} />
:
setConnectionsMode("AboutSheet")} />
}
@@ -795,7 +795,7 @@ const AboutSheetButtons = ({ setConnectionsMode, masterPanelSheetId }) => {
}} />
: null }
- setConnectionsMode("Share")} />
+ setConnectionsMode("Share")} />
);
}
@@ -804,13 +804,13 @@ const SheetToolsList = ({ toggleSignUpModal, masterPanelSheetId, setConnectionsM
// const [isOwner, setIsOwner] = useState(false);
// const [isPublished, setIsPublished] = useState(false);
const googleDriveState = {
- export: { en: Sefaria._("export.google_doc") , he: Sefaria._("export.google_doc") },
- exporting: {en: Sefaria._("Exporting to Google Docs..."), he: Sefaria._("Exporting to Google Docs..."), greyColor: true},
- exportComplete: { en: Sefaria._("export.complete"), he: Sefaria._("export.complete"), secondaryEn: Sefaria._("export.open_google"), secondaryHe: Sefaria._("export.open_google"), greyColor: true}
+ export: { en: Sefaria._("common.export.google_doc") , he: Sefaria._("common.export.google_doc") },
+ exporting: {en: Sefaria._("common.exporting.google_doc"), he: Sefaria._("common.exporting.google_doc"), greyColor: true},
+ exportComplete: { en: Sefaria._("common.export.complete"), he: Sefaria._("common.export.complete"), secondaryEn: Sefaria._("common.export.open_google"), secondaryHe: Sefaria._("common.export.open_google"), greyColor: true}
}
const copyState = {
- copy: { en: Sefaria._("copy"), he: Sefaria._("copy") },
- copying: { en: Sefaria._("copying"), he: Sefaria._("copying"), greyColor: true},
+ copy: { en: Sefaria._("connection_panel.copy"), he: Sefaria._("connection_panel.copy") },
+ copying: { en: Sefaria._("connection_panel.copying"), he: Sefaria._("connection_panel.copying"), greyColor: true},
copied: { en: Sefaria._("Sheet Copied"), he: Sefaria._("Sheet Copied"), secondaryHe: Sefaria._("sheet.view_copy"), secondaryEn: Sefaria._("sheet.view_copy"), greyColor: true },
error: { en: Sefaria._("message.there_is_error"), he: Sefaria._("message.there_is_error") }
}
@@ -926,7 +926,7 @@ const SheetToolsList = ({ toggleSignUpModal, masterPanelSheetId, setConnectionsM
sheet.owner === Sefaria._uid ||
sheet.options.collaboration === "anyone-can-edit"
) ?
- setConnectionsMode("DivineName")} /> : null}
+ setConnectionsMode("DivineName")} /> : null}
)
@@ -939,7 +939,7 @@ class SheetNodeConnectionTools extends Component {
: null}
this.props.setConnectionsMode("Sheets")} />
- this.props.setConnectionsMode("Feedback")} />
+ this.props.setConnectionsMode("Feedback")} />
);
}
}
@@ -1149,7 +1149,7 @@ const TopicList = ({ masterPanelMode, srefs, interfaceLang, contentLang }) => {
{Sefaria.is_moderator && masterPanelMode === "Text" ?
+ createNewTopicStr={Sefaria._("topic.create_new_topic")}/>
: null}
{(!topics || !topics.length) ? (
@@ -1243,8 +1243,8 @@ class WebPagesList extends Component {
if (!content.length) {
const filterName = this.props.filter !== "all" ? this.props.filter : null;
- const en = Sefaria._("no_web_pages") + (filterName ? Sefaria._("from") + filterName : "") + Sefaria._("here");
- const he = Sefaria._("no_web_pages") + (filterName ? Sefaria._("from") + filterName : "") + Sefaria._("here");
+ const en = Sefaria._("connection_panel.web_list.no_web_pages") + (filterName ? Sefaria._("connection_panel.web_list.from") + filterName : "") + Sefaria._("connection_panel.web_list.here");
+ const he = Sefaria._("connection_panel.web_list.no_web_pages") + (filterName ? Sefaria._("connection_panel.web_list.from") + filterName : "") + Sefaria._("connection_panel.web_list.here");
return
;
@@ -1296,8 +1296,8 @@ const AdvancedToolsList = ({srefs, canEditText, currVersions, setConnectionsMode
return (
-
- !Sefaria._uid ? toggleSignUpModal(SignUpModalKind.AddConnection) : setConnectionsMode("Add Connection")} />
+
+ !Sefaria._uid ? toggleSignUpModal(SignUpModalKind.AddConnection) : setConnectionsMode("Add Connection")} />
{editText ? () : null}
);
@@ -1441,7 +1441,7 @@ class ShareBox extends Component {
{this.state.sheet && Sefaria._uid === this.state.sheet.owner ?
- people_with_link
+ connection_panel.people_with_link
: null}
-
-
-
- {/* */}
+
+
+
+ {/* */}
);
}
@@ -1538,7 +1538,7 @@ class AddNoteBox extends Component {
- {this.props.noteId ? Sefaria._("button.save") : Sefaria._("text.add_note")}
+ {this.props.noteId ? Sefaria._("common.button.save") : Sefaria._("text.add_note")}
{this.props.noteId ?
@@ -1698,14 +1698,14 @@ class AddConnectionBox extends Component {
{ Sefaria._("connection.choose_text_to_connect")}
- { Sefaria._("browse")}
+ { Sefaria._("connection_panel.add_connection.browse")}
: null}
{this.props.srefs.length > 2 ?
- { Sefaria._("messange.we_only_understand_connection_betweeen_two_texts")}
+ { Sefaria._("message.we_only_understand_connection_betweeen_two_texts")}
: null}
@@ -1726,11 +1726,11 @@ class AddConnectionBox extends Component {
{ value: "reference", label: Sefaria._("text.reference") },
{ value: "related", label: Sefaria._("text.related Passage") }
]}
- placeholder={Sefaria._("select_type")}
+ placeholder={Sefaria._("common.select_type")}
onChange={this.setType} />
- {Sefaria._("add_connection")}
+ {Sefaria._("connection_panel.tool_button.add_connection")}
@@ -1773,7 +1773,7 @@ function ManuscriptImage(props) {
{
manuscript.manuscript[description]
?
-
+
{manuscript.manuscript[description]}
: ''
@@ -1781,7 +1781,7 @@ function ManuscriptImage(props) {
{
manuscript.manuscript['license']
?
: ''
}
-
+
{ Sefaria.util.parseUrl(manuscript.manuscript['source']).host.replace("www.", "") }
diff --git a/static/js/DictionarySearch.jsx b/static/js/DictionarySearch.jsx
index 75376e7d60..6e656c73eb 100644
--- a/static/js/DictionarySearch.jsx
+++ b/static/js/DictionarySearch.jsx
@@ -179,7 +179,7 @@ class DictionarySearch extends Component {
Cancel
- Save
+ common.save
diff --git a/static/js/Footer.jsx b/static/js/Footer.jsx
index 45ea375102..5597d9f0c0 100644
--- a/static/js/Footer.jsx
+++ b/static/js/Footer.jsx
@@ -34,7 +34,7 @@ class Footer extends Component {
return (
- Version: 1.2.0
+ Version: 1.2.0
);
}
diff --git a/static/js/Header.jsx b/static/js/Header.jsx
index ed3359e2ac..2673d1bdf2 100644
--- a/static/js/Header.jsx
+++ b/static/js/Header.jsx
@@ -142,7 +142,7 @@ class SearchBar extends Component {
this.state = {
searchFocused: false
};
- this._searchOverridePre = Sefaria._("search_for") +': "';
+ this._searchOverridePre = Sefaria._("header.search_bar.search_for") +': "';
this._searchOverridePost = '"';
this._type_icon_map = {
"Collection": "collection.svg",
@@ -379,7 +379,7 @@ class SearchBar extends Component {
{
@@ -535,7 +535,7 @@ const MobileNavMenu = ({onRefClick, showSearch, openTopic, openURL, close, visib
- save_and_history
+ bookmark.save_and_history
@@ -545,7 +545,7 @@ const MobileNavMenu = ({onRefClick, showSearch, openTopic, openURL, close, visib
{/*
- About Sefaria
+ About Pecha
*/}
{Sefaria._uid ?
@@ -698,7 +698,7 @@ const HelpButton = () => {
return (
);
diff --git a/static/js/Misc.jsx b/static/js/Misc.jsx
index a5b36d0c50..ee9f646260 100644
--- a/static/js/Misc.jsx
+++ b/static/js/Misc.jsx
@@ -318,7 +318,7 @@ class ProfilePic extends Component {
(
{ event.target.value = null}}/>
) : null
}
@@ -342,14 +342,14 @@ class ProfilePic extends Component {
{ (uploading || isFirstCropChange) ? (
) : (
- { Sefaria._("drag_corners_to_crop_images") }
+ { Sefaria._("profile.picture.drag_corners_to_crop_images") }
@@ -473,7 +473,7 @@ const FilterableList = ({
setFilter(e.target.value)}
@@ -1142,11 +1142,11 @@ const CategoryHeader = ({children, type, data = [], buttonsToDisplay = ["subcat
const [addSource, toggleAddSource] = useEditToggle();
const [addSection, toggleAddSection] = useEditToggle();
const [hiddenButtons, setHiddenButtons] = useHiddenButtons(true);
- const buttonOptions = {"subcategory": ["category.add_sub_category", toggleAddCategory],
- "source": ["category.add_source", toggleAddSource],
- "section": ["category.add_section", toggleAddSection],
+ const buttonOptions = {"subcategory": ["category.admin.add_sub_category", toggleAddCategory],
+ "source": ["category.admin.add_source", toggleAddSource],
+ "section": ["category.admin.add_section", toggleAddSection],
"reorder": ["category.reorder_section", toggleReorderCategory],
- "edit": ["edit", toggleEditCategory]};
+ "edit": ["category.admin.edit", toggleEditCategory]};
let wrapper = "";
let adminButtonsSpan = null;
@@ -1882,7 +1882,7 @@ const SheetListing = ({
}
{
deletable ?
-
+
: null
}
{
@@ -1924,7 +1924,7 @@ const CollectionListing = ({data}) => {
{data.listed ? null :
(
- collection_list.unlisted
+ collection.collection_list.unlisted
) }
{data.listed ? null :
@@ -1932,7 +1932,7 @@ const CollectionListing = ({data}) => {
{`${data.sheetCount} `}
- sheets
+ common.sheets
{data.memberCount > 1 ?
@@ -1999,10 +1999,10 @@ class LoginPrompt extends Component {
{ Sefaria._("message.login_to_use_feature")}
- { Sefaria._("log_in")}
+ { Sefaria._("common.log_in")}
- { Sefaria._("sign_up")}
+ { Sefaria._("common.sign_up")}
);
}
@@ -2561,8 +2561,8 @@ Dropdown.propTypes = {
class LoadingMessage extends Component {
render() {
- var message = this.props.message || Sefaria._("loading...") ;
- var heMessage = this.props.heMessage || Sefaria._("loading...");
+ var message = this.props.message || Sefaria._("common.loading") ;
+ var heMessage = this.props.heMessage || Sefaria._("common.loading");
var classes = "loadingMessage sans-serif " + (this.props.className || "");
return (
@@ -2714,7 +2714,7 @@ class FeedbackBox extends Component {
{value: "good_vibes", label: Sefaria._("give_thanks")},
{value: "other", label: Sefaria._("other")},
]}
- placeholder={Sefaria._("select_type")}
+ placeholder={Sefaria._("common.select_type")}
onChange={this.setType}
/>
@@ -2725,7 +2725,7 @@ class FeedbackBox extends Component {
: null }
this.sendFeedback()}>
- {Sefaria._("button.submit")}
+ {Sefaria._("common.button.submit")}
);
@@ -2783,8 +2783,8 @@ class CookiesNotification extends Component {
- { Sefaria._("message.cookies_msg") }{ Sefaria._("learn_more") }
- { Sefaria._("ok") }
+ { Sefaria._("message.cookies_msg") }{ Sefaria._("common.learn_more") }
+ { Sefaria._("common.ok") }
@@ -2891,7 +2891,7 @@ const AdminToolHeader = function({title, validate, close}) {
{ Sefaria._("button.cancel")}
- { Sefaria._("button.save")}
+ { Sefaria._("common.button.save")}
@@ -2980,7 +2980,7 @@ const TitleVariants = function({titles, update, options}) {
const onTitleValidate = function (title) {
const validTitle = titles.every((item) => item.name !== title.name);
if (!validTitle) {
- alert(title.name+ Sefaria._(" already exists."))
+ alert(title.name+ Sefaria._("common.all_ready_exists"))
}
return validTitle;
}
@@ -3017,7 +3017,7 @@ const DivineNameReplacer = ({setDivineNameReplacement, divineNameReplacement}) =
{value: "h", label:'ה׳'},
{value: "ykvk", label: 'יקוק'},
]}
- placeholder={Sefaria._("select_type")}
+ placeholder={Sefaria._("common.select_type")}
onChange={(e) => setDivineNameReplacement((e.target.value))}
preselected={divineNameReplacement}
/>
diff --git a/static/js/NotificationsPanel.jsx b/static/js/NotificationsPanel.jsx
index 741a5ea7f3..5cf033e9cb 100644
--- a/static/js/NotificationsPanel.jsx
+++ b/static/js/NotificationsPanel.jsx
@@ -211,7 +211,7 @@ const FollowNotification = ({date, content}) => {
const topLine = (
<>
{content.name}
- is_following_you"
+ notifcation.is_following_you"
>
);
diff --git a/static/js/ReaderApp.jsx b/static/js/ReaderApp.jsx
index 436d5bebc4..5bdb069375 100644
--- a/static/js/ReaderApp.jsx
+++ b/static/js/ReaderApp.jsx
@@ -495,7 +495,7 @@ class ReaderApp extends Component {
hist.mode = "topicCat";
} else {
hist.url = "topics";
- hist.title = Sefaria._("Topics | " + siteName);
+ hist.title = "Topics | " + siteName;
hist.mode = "topics";
}
break;
diff --git a/static/js/ReaderPanel.jsx b/static/js/ReaderPanel.jsx
index b653868d9c..81449eac05 100644
--- a/static/js/ReaderPanel.jsx
+++ b/static/js/ReaderPanel.jsx
@@ -643,8 +643,9 @@ class ReaderPanel extends Component {
let items = [];
let menu = null;
+ let isNarrowColumn = false;
const contextContentLang = {"language": this.getContentLanguageOverride(this.state.settings.language, this.state.mode, this.state.menuOpen)};
-
+ (this.state.width < 730) ? isNarrowColumn = true : false;
if (this.state.mode === "Text" || this.state.mode === "TextAndConnections") {
const oref = Sefaria.parseRef(this.state.refs[0]);
const showHighlight = this.state.showHighlight || (this.state.highlightedRefs.length > 1);
@@ -822,8 +823,10 @@ class ReaderPanel extends Component {
showBaseText={this.showBaseText} />);
} else if (this.state.menuOpen === "text toc") {
+ console.log(this.state.menuOpen)
menu = ( 500 ?
);
let aliyahOptions = [
- {name: "aliyotOn", content: Sefaria._("on"), role: "radio", ariaLabel: Sefaria._("Show Parasha Aliyot") },
- {name: "aliyotOff", content: Sefaria._("off"), role: "radio", ariaLabel: Sefaria._("Hide Parasha Aliyot") },
+ {name: "aliyotOn", content: Sefaria._("common.on"), role: "radio", ariaLabel: Sefaria._("Show Parasha Aliyot") },
+ {name: "aliyotOff", content: Sefaria._("common.off"), role: "radio", ariaLabel: Sefaria._("Hide Parasha Aliyot") },
];
let aliyahToggle = this.renderAliyotToggle() ? (
this.props.parentPanel == "Sheet" ? null :
@@ -1622,14 +1627,14 @@ class ReaderDisplayOptionsMenu extends Component {
currentValue={this.props.settings.aliyotTorah} />) : null;
let vowelsOptions = [
- {name: "all", content: "אָ֑", role: "radio", ariaLabel: Sefaria._("show_vowels")},
- {name: "partial", content: "אָ", role: "radio", ariaLabel: Sefaria._("show_only_vowels")},
- {name: "none", content: "א", role: "radio", ariaLabel: Sefaria._("show_only_consonenetal_text")}
+ {name: "all", content: "אָ֑", role: "radio", ariaLabel: Sefaria._("text.reader_option_menu.show_vowels")},
+ {name: "partial", content: "אָ", role: "radio", ariaLabel: Sefaria._("text.reader_option_menu.show_only_vowels")},
+ {name: "none", content: "א", role: "radio", ariaLabel: Sefaria._("text.reader_option_menu.show_only_consonenetal_text")}
];
let vowelToggle = null;
if(!this.props.menuOpen){
let vowelOptionsSlice = this.vowelToggleAvailability();
- let vowelOptionsTitle = (vowelOptionsSlice == 0) ? Sefaria._("vocalization") : Sefaria._("vowels");
+ let vowelOptionsTitle = (vowelOptionsSlice == 0) ? Sefaria._("text.reader_option_menu.vocalization") : Sefaria._("text.reader_option_menu.vowels");
vowelsOptions = vowelsOptions.slice(vowelOptionsSlice);
vowelToggle = (this.props.settings.language !== "english" && vowelsOptions.length > 1) ?
this.props.parentPanel == "Sheet" ? null :
@@ -1643,13 +1648,13 @@ class ReaderDisplayOptionsMenu extends Component {
}
let punctuationOptions = [
- {name: "punctuationOn", content: Sefaria._("on"), role: "radio", ariaLabel: Sefaria._("show_punchuation")},
- {name: "punctuationOff", content: Sefaria._("off"), role: "radio", ariaLabel: Sefaria._("hide_punchuation")}
+ {name: "punctuationOn", content: Sefaria._("common.on"), role: "radio", ariaLabel: Sefaria._("text.reader_option_menu.show_puntuation")},
+ {name: "punctuationOff", content: Sefaria._("common.off"), role: "radio", ariaLabel: Sefaria._("text.reader_option_menu.hide_puntuation")}
]
let punctuationToggle = this.shouldPunctuationToggleRender() ? (
- Options
+ common.options
- {_("exact_matches_only")}
+ {_("search_filter.exact_matches_only")}
diff --git a/static/js/SearchPage.jsx b/static/js/SearchPage.jsx
index 7ca607ab53..3fe6c66de2 100644
--- a/static/js/SearchPage.jsx
+++ b/static/js/SearchPage.jsx
@@ -46,7 +46,7 @@ class SearchPage extends Component {
{this.state.totalResults?.getValue() > 0 ?
{this.state.totalResults.asString()}
- {_("results")}
+ {_("search_page.results")}
: null }
diff --git a/static/js/SearchResultList.jsx b/static/js/SearchResultList.jsx
index a3b88fbc09..1caeb255ad 100644
--- a/static/js/SearchResultList.jsx
+++ b/static/js/SearchResultList.jsx
@@ -36,7 +36,7 @@ const SourcesSheetsDiv = (props) => {
sourcesSheetsCounts.push(sourcesDiv);
}
if (props?.numSheets > 0) {
- const sheetsDiv = {props.numSheets} sheets;
+ const sheetsDiv = {props.numSheets} common.sheets;
sourcesSheetsCounts.push(sheetsDiv);
}
@@ -542,7 +542,7 @@ class SearchResultList extends Component {
}
}
- const loadingMessage = ();
+ const loadingMessage = ();
const noResultsMessage = ();
const queryFullyLoaded = !this.state.moreToLoad[tab] && !this.state.isQueryRunning[tab];
diff --git a/static/js/Sheet.jsx b/static/js/Sheet.jsx
index 22f1d159e0..c6b9c1c46c 100644
--- a/static/js/Sheet.jsx
+++ b/static/js/Sheet.jsx
@@ -439,7 +439,7 @@ class SheetSource extends Component {
{this.props.source.addedBy ?
- {Sefaria._("added_by")}:
+ {Sefaria._("sheet.source_sheet.added_by")}:
: null }
@@ -542,7 +542,7 @@ class SheetOutsideText extends Component {
{this.props.source.addedBy ?
- {Sefaria._("added_by")}:
+ {Sefaria._("sheet.source_sheet.added_by")}:
: null }
@@ -584,7 +584,7 @@ class SheetOutsideBiText extends Component {
{this.props.source.addedBy ?
- {Sefaria._("added_by")}:
+ {Sefaria._("sheet.source_sheet.added_by")}:
: null }
@@ -654,7 +654,7 @@ class SheetMedia extends Component {
{this.props.source.addedBy ?
- {Sefaria._("added_by")}:
+ {Sefaria._("sheet.source_sheet.added_by")}:
: null }
diff --git a/static/js/SheetMetadata.jsx b/static/js/SheetMetadata.jsx
index 2c2c76d823..9b71b13a7d 100644
--- a/static/js/SheetMetadata.jsx
+++ b/static/js/SheetMetadata.jsx
@@ -282,7 +282,7 @@ class SheetMetadata extends Component {
const newSummary = event.target.value
if (event.target.value.length > 280) {
this.setState({
- validationMsg: Sefaria._("summary_limit"),
+ validationMsg: Sefaria._("sheet.message.summary_limit"),
validationFailed: "summary"
});
}
@@ -377,13 +377,13 @@ class SheetMetadata extends Component {
: null }
- {Sefaria._("created")} {Sefaria.util.naturalTime(timestampCreated, "en")} {Sefaria._("ago")} · {sheet.views} {Sefaria._("profile.tab.sheet.tag.views")} · { !!this.state.sheetSaves ? this.state.sheetSaves.length + this.state.sheetLikeAdjustment : '--'} {Sefaria._("Saves")} {this.state.published ? null : (
·
{Sefaria._("profile.tab.sheet.tag.not_published")})}
+ {Sefaria._("common.created")} {Sefaria.util.naturalTime(timestampCreated, "en")} {Sefaria._("sheet.created_time.ago")} · {sheet.views} {Sefaria._("profile.tab.sheet.tag.views")} · { !!this.state.sheetSaves ? this.state.sheetSaves.length + this.state.sheetLikeAdjustment : '--'} {Sefaria._("common.saves")} {this.state.published ? null : (
·
{Sefaria._("profile.tab.sheet.tag.not_published")})}
-
{Sefaria._("created")} {Sefaria.util.naturalTime(timestampCreated, "he")} {Sefaria._("ago")} ·
+
{Sefaria._("common.created")} {Sefaria.util.naturalTime(timestampCreated, "he")} {Sefaria._("sheet.created_time.ago")} ·
{sheet.views} · {Sefaria._("profile.tab.sheet.tag.views")}
-
{!!this.state.sheetSaves ? this.state.sheetSaves.length + this.state.sheetLikeAdjustment : '--' } {Sefaria._("Saves")} {this.state.published ? null : (
·
{Sefaria._("profile.tab.sheet.tag.not_published")})}
+
{!!this.state.sheetSaves ? this.state.sheetSaves.length + this.state.sheetLikeAdjustment : '--' } {Sefaria._("common.saves")} {this.state.published ? null : (
·
{Sefaria._("profile.tab.sheet.tag.not_published")})}
@@ -450,13 +450,13 @@ class SheetMetadata extends Component {
{canEdit ?
- {this.state.published ? Sefaria._("publish_setting"): Sefaria._("Publish Sheet")}
+ {this.state.published ? Sefaria._("sheet.publish_setting"): Sefaria._("Publish Sheet")}
{this.state.published ?
-
{ Sefaria._("sheet.your_sheet_is")} { Sefaria._("published")} { Sefaria._("topic.visible_to_other")}
:
+
{ Sefaria._("sheet.your_sheet_is")} { Sefaria._("sheet.published")} { Sefaria._("topic.visible_to_other")}
:
{ Sefaria._("List your sheet on Sefaria for others to discover.")}
}
@@ -478,7 +478,7 @@ class SheetMetadata extends Component {
tags={this.state.tags}
suggestions={this.state.suggestions}
onDelete={this.onTagDelete.bind(this)}
- placeholderText={Sefaria._("add_topic")}
+ placeholderText={Sefaria._("sheet.placeholder.add_topic")}
delimiters={["Enter", "Tab", ","]}
onAddition={this.onTagAddition.bind(this)}
onValidate={this.onTagValidate.bind(this)}
diff --git a/static/js/TextColumnBanner.jsx b/static/js/TextColumnBanner.jsx
index 2842e1907e..a234dec4d4 100644
--- a/static/js/TextColumnBanner.jsx
+++ b/static/js/TextColumnBanner.jsx
@@ -92,7 +92,7 @@ const TransLangPrefAskBanner = ({ setAccepted, setTranslationLanguagePreference
*/
const OpenTransBanner = ({ openTranslations }) => {
const buttons = [{
- text: Sefaria._("go_to_translation"),
+ text: Sefaria._("text.text_column_banner.go_to_translation"),
onClick: () => { openTranslations(); },
sideEffect: "close",
}];
diff --git a/static/js/TopicPage.jsx b/static/js/TopicPage.jsx
index 44b156036e..d80772b6c1 100644
--- a/static/js/TopicPage.jsx
+++ b/static/js/TopicPage.jsx
@@ -248,7 +248,7 @@ const TopicCategory = ({topic, topicTitle, setTopic, setNavTopic, compare, initi
type: "TitledText",
props: {
enTitle: "About",
- heTitle: Sefaria._("about"),
+ heTitle: Sefaria._("common.about"),
enText: topicData.description.en,
heText: topicData.description.he
}
@@ -497,8 +497,8 @@ const TopicPage = ({
if (displayTabs.length) {
displayTabs.push({
title: {
- en: Sefaria._("dropdown.filter"),
- he: Sefaria._("dropdown.filter")
+ en: Sefaria._("common.dropdown.filter"),
+ he: Sefaria._("common.dropdown.filter")
},
id: 'filter',
icon: `/static/icons/arrow-${showFilterHeader ? 'up' : 'down'}-bold.svg`,
@@ -852,7 +852,7 @@ const TopicMetaData = ({ topicTitle, timePeriod, multiPanel, topicImage, propert
if (!url) { return null; }
return (
);
diff --git a/static/js/TopicPageAll.jsx b/static/js/TopicPageAll.jsx
index d253f5706c..7d01f89cb4 100644
--- a/static/js/TopicPageAll.jsx
+++ b/static/js/TopicPageAll.jsx
@@ -97,7 +97,7 @@ class TopicPageAll extends Component {

-
+
{ this.state.filter.length ?
topic.reset
diff --git a/static/js/TopicSearch.jsx b/static/js/TopicSearch.jsx
index c78f66cb20..a1db61c72b 100644
--- a/static/js/TopicSearch.jsx
+++ b/static/js/TopicSearch.jsx
@@ -114,7 +114,7 @@ class TopicSearch extends Component {
else {
return (
(
- Translations
+ connection_pannel.translations
-
- Pecha acquires translations to enrich your learning experience. Preview or choose a different translation below.
- དཔེ་ཆ་དྲ་ཚིག་གིས་འགྱུར་མ་ཁག་བཟོས་ཏེ་སྦྱོང་ཡག་ལ་རོག་རམ་བྱེད་ཐུབ་ གཤམ་འོག་ལ་སྐད་ཡིག་གཞན་འདེམ་རོགས་།
-
+
connection_pannel.translation.description
- learn_more
+ common.learn_more
diff --git a/static/js/UpdatesPanel.jsx b/static/js/UpdatesPanel.jsx
index d8c0a5d599..25b7587114 100644
--- a/static/js/UpdatesPanel.jsx
+++ b/static/js/UpdatesPanel.jsx
@@ -94,7 +94,7 @@ class UpdatesPanel extends Component {
-
Updates
+
side_nav.updates
{Sefaria.is_moderator?
:""}
diff --git a/static/js/UserHistoryPanel.jsx b/static/js/UserHistoryPanel.jsx
index e9bb695863..c881bb5c84 100644
--- a/static/js/UserHistoryPanel.jsx
+++ b/static/js/UserHistoryPanel.jsx
@@ -29,7 +29,7 @@ const UserHistoryPanel = ({menuOpen, toggleLanguage, openDisplaySettings, openNa
- save
+ common.save
@@ -114,8 +114,8 @@ const UserHistoryList = ({store, scrollableRef, menuOpen, toggleSignUpModal}) =>
return (
{menuOpen === "history" ?
- text_sheet_available_here
- : {Sefaria._("bookmark.icon_description")}}
+ user_history_panel.text_sheet_available_here
+ : bookmark.icon_description}
);
}
diff --git a/static/js/UserProfile.jsx b/static/js/UserProfile.jsx
index 179f12dd7f..eb253eac6f 100644
--- a/static/js/UserProfile.jsx
+++ b/static/js/UserProfile.jsx
@@ -32,17 +32,17 @@ class UserProfile extends Component {
const showNotes = !!props.profile.id && Sefaria._uid === props.profile.id;
const showBio = !!props.profile.bio;
const tabs = [
- { id: "sheets", text: "Sheets", icon: "/static/icons/sheet.svg" },
- { id: "collections", text: Sefaria._("collection"), icon: "/static/icons/collection.svg" },
- { id: "followers", text: "Followers", invisible: true },
- { id: "following", text: "Following", invisible: true },
+ { id: "sheets", text:Sefaria._("profile.tab.sheets"), icon: "/static/icons/sheet.svg" },
+ { id: "collections", text: Sefaria._("profile.tab.collection"), icon: "/static/icons/collection.svg" },
+ { id: "followers", text: Sefaria._("common.followers"), invisible: true },
+ { id: "following", text: Sefaria._("common.following"), invisible: true },
{ id: "torah-tracker", text: Sefaria._("profile.buddhish_text_tracker"), invisible: Sefaria._uid !== props.profile.id, icon: "/static/icons/chart-icon.svg", href: "/torahtracker", applink: true, justifyright: true}
];
if (showNotes) {
- tabs.splice(2, 0, { id: "notes", text: Sefaria._("notes"), icon: "/static/icons/note.svg" });
+ tabs.splice(2, 0, { id: "notes", text: Sefaria._("user_profile.notes"), icon: "/static/icons/note.svg" });
}
if (showBio) {
- tabs.push({ id: "about", text: Sefaria._("about"), icon: "/static/icons/info.svg" });
+ tabs.push({ id: "about", text: Sefaria._("common.about"), icon: "/static/icons/info.svg" });
}
return {
showNotes,
@@ -96,7 +96,7 @@ class UserProfile extends Component {
- Create a New Collection
+ common.collection.btn.create_new_collection
);
}
@@ -111,7 +111,7 @@ class UserProfile extends Component {
);
@@ -257,14 +257,14 @@ class UserProfile extends Component {
renderFollowerHeader() {
return (
- followers {`(${this.props.profile.followers.length})`}
+ common.followers {`(${this.props.profile.followers.length})`}
);
}
renderFollowingHeader() {
return (
- following {`(${this.props.profile.followees.length})`}
+ common.following {`(${this.props.profile.followees.length})`}
);
}
@@ -287,14 +287,14 @@ class UserProfile extends Component {
renderEmptyFollowerList() {
return (
- {Sefaria._("zero_followers")}
+ {Sefaria._("profile.zero_followers")}
);
}
renderEmptyFollowingList() {
return (
- {Sefaria._("zero_following")}
+ {Sefaria._("profile.zero_following")}
);
}
@@ -359,7 +359,7 @@ class UserProfile extends Component {
renderItem={this.renderSheet}
renderEmptyList={this.renderEmptySheetList}
renderHeader={this.renderSheetHeader}
- sortOptions={[Sefaria._("filter_list.recent"), Sefaria._("profile.tab.sheet.tag.views")]}
+ sortOptions={[Sefaria._("common.filter_list.recent"), Sefaria._("profile.tab.sheet.tag.views")]}
containerClass={"sheetList"}
getData={this.getSheets}
data={this.getSheetsFromCache()}
@@ -373,7 +373,7 @@ class UserProfile extends Component {
renderItem={this.renderCollection}
renderEmptyList={this.renderEmptyCollectionList}
renderHeader={this.renderCollectionHeader}
- sortOptions={["Recent", "Name", "Sheets"]}
+ sortOptions={[Sefaria._("common.filter_list.recent"), Sefaria._("common.filter_list.name"), Sefaria._("common.sheets")]}
getData={this.getCollections}
data={this.getCollectionsFromCache()}
refreshData={this.state.refreshCollectionsData}
@@ -441,7 +441,7 @@ const EditorToggleHeader = ({usesneweditor}) => {
const [feedbackHeaderState, setFeedbackHeaderState] = useState("hidden")
const text =
{usesneweditor ? "You are currently testing the new Sefaria editor." : "You are currently using the old Sefaria editor."};
- const buttonText =
{usesneweditor ? "back_to_old_version" : "try_new_version"};
+ const buttonText =
{usesneweditor ? "editor.back_to_old_version" : "editor.message.try_new_version"};
const sendFeedback = () => {
@@ -480,9 +480,9 @@ const EditorToggleHeader = ({usesneweditor}) => {
message.new_pecha_editor
message.encounter_issue
- - technical_problem
+ - message.technical_problem
- editor.difficulties_using_editor
- - missing_feature
+ - message.missing_feature
@@ -500,14 +500,14 @@ const EditorToggleHeader = ({usesneweditor}) => {
message.thanks_for_trying_new_editor
message.go_to_profile_to_create_new_sheet hello@sefaria.org
-
+
)
const thankYouContent = (
-
thank_you
+
feedback.message.thank_you
feedback.message.response hello@sefaria.org.
-
+
)
@@ -573,7 +573,7 @@ const ProfileSummary = ({ profile:p, follow, openFollowers, openFollowing, toggl
{ p.position || p.organization ?
- sd fasdfa{p.position}
+ {p.position}
{ p.position && p.organization ? { Sefaria._("profile.at") } : null }
{p.organization}
: null
@@ -616,12 +616,12 @@ const ProfileSummary = ({ profile:p, follow, openFollowers, openFollowing, toggl
diff --git a/static/js/VersionBlock/VersionBlock.jsx b/static/js/VersionBlock/VersionBlock.jsx
index 13540a987f..5851909ef1 100644
--- a/static/js/VersionBlock/VersionBlock.jsx
+++ b/static/js/VersionBlock/VersionBlock.jsx
@@ -15,7 +15,7 @@ import VersionBlockWithPreview from "./VersionBlockWithPreview";
class VersionBlockUtils {
static makeVersionTitle(version){
if (version.merged) {
- return {"className" : "", "text": Sefaria._("merged_from") + " " + Array.from(new Set(version.sources)).join(", ")};
+ return {"className" : "", "text": Sefaria._("text.version.merged_from") + " " + Array.from(new Set(version.sources)).join(", ")};
} else if (Sefaria.interfaceLang === "english" || !version.versionTitleInHebrew) {
return {"className" : "", "text" : version.versionTitle};
} else {
@@ -189,7 +189,7 @@ class VersionBlock extends Component {
}
makeSelectVersionLanguage(){
let voc = this.props.version.isSource ? 'Version' : "Translation";
- return this.props.isCurrent ? Sefaria._("Current " + voc) : Sefaria._("select "+ voc);
+ return this.props.isCurrent ? Sefaria._("Current") : Sefaria._("common.select");
}
hasExtendedNotes(){
@@ -321,7 +321,7 @@ class VersionBlock extends Component {
- {Sefaria._("Read More")}
+ {Sefaria._("common.read_more")}
diff --git a/static/js/VersionBlock/VersionImage.jsx b/static/js/VersionBlock/VersionImage.jsx
index 5732a7849e..018e133f6b 100644
--- a/static/js/VersionBlock/VersionImage.jsx
+++ b/static/js/VersionBlock/VersionImage.jsx
@@ -15,7 +15,7 @@ function VersionImage({version}) {
diff --git a/static/js/VersionBlock/VersionInformation.jsx b/static/js/VersionBlock/VersionInformation.jsx
index a20b014e48..8e739e1e83 100644
--- a/static/js/VersionBlock/VersionInformation.jsx
+++ b/static/js/VersionBlock/VersionInformation.jsx
@@ -21,7 +21,7 @@ function VersionInformation({currentRef, version}) {
diff --git a/static/js/categorize_sheets.jsx b/static/js/categorize_sheets.jsx
index 6ba206debb..906cfebfcf 100644
--- a/static/js/categorize_sheets.jsx
+++ b/static/js/categorize_sheets.jsx
@@ -189,7 +189,7 @@ class SheetCategorizer extends React.Component {
suggestions={this.state.suggestions}
onDelete={this.onTagDelete.bind(this)}
onAddition={this.onTagAddition.bind(this)}
- placeholderText={Sefaria._("add_topic")}
+ placeholderText={Sefaria._("sheet.placeholder.add_topic")}
delimiters={["Enter", "Tab", ","]}
onInput={this.updateSuggestedTags.bind(this)}
/>
@@ -206,7 +206,7 @@ class SheetCategorizer extends React.Component {