Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling #17

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
cdca352
spelling: accidentally
jsoref Jan 27, 2019
0d8e1c0
spelling: activity
jsoref Jan 27, 2019
01c370b
spelling: anyway
jsoref Jan 27, 2019
f7a726c
spelling: aysc (??)
jsoref Jan 27, 2019
4705488
spelling: bilingual
jsoref Jan 27, 2019
4d2eb4a
spelling: booktitle
jsoref Jan 27, 2019
1013450
spelling: careful
jsoref Jan 27, 2019
e7e1065
spelling: change
jsoref Jan 27, 2019
bd15c1a
spelling: chinuch
jsoref Jan 27, 2019
05c5cce
spelling: column
jsoref Jan 27, 2019
9d80bb7
spelling: contain
jsoref Jan 27, 2019
af7995f
spelling: dimensions
jsoref Jan 27, 2019
f55c7b5
spelling: divide
jsoref Jan 27, 2019
a6c64f0
spelling: doesn't
jsoref Jan 27, 2019
6218696
spelling: english
jsoref Jan 27, 2019
84f5cf8
spelling: escaping
jsoref Jan 27, 2019
ee1a6e3
spelling: everything
jsoref Jan 27, 2019
6bd8f93
spelling: hack
jsoref Jan 27, 2019
f649587
spelling: haftara
jsoref Jan 27, 2019
97f0be6
spelling: halakhah
jsoref Jan 27, 2019
cee5533
spelling: heades (?!)
jsoref Jan 27, 2019
2b6a914
spelling: ignoring
jsoref Jan 27, 2019
d1ec8af
spelling: indeterminate
jsoref Jan 27, 2019
91e3c2a
spelling: initialize
jsoref Jan 27, 2019
a189418
spelling: invisible
jsoref Jan 27, 2019
8efe2f9
spelling: library
jsoref Jan 27, 2019
9170e5c
spelling: logging
jsoref Jan 27, 2019
52da9e9
spelling: make
jsoref Jan 27, 2019
d5b4634
spelling: memory
jsoref Jan 27, 2019
37ae010
spelling: montserrat
jsoref Jan 27, 2019
d369da8
spelling: nikkuds
jsoref Jan 27, 2019
78225e7
spelling: occurred
jsoref Jan 27, 2019
4d9433f
spelling: conversion
jsoref Jan 27, 2019
3130e1d
spelling: debug
jsoref Jan 27, 2019
efae224
spelling: ofrequested
jsoref Jan 27, 2019
c23d6f4
spelling: overridden
jsoref Jan 27, 2019
c50d215
spelling: refer
jsoref Jan 27, 2019
e7f3852
spelling: regular
jsoref Jan 27, 2019
5acfa3d
spelling: represent
jsoref Jan 27, 2019
0f33bcc
spelling: returns
jsoref Jan 27, 2019
00f3e91
spelling: sefer
jsoref Jan 27, 2019
442fc49
spelling: separated
jsoref Jan 27, 2019
af6ba3b
spelling: separator
jsoref Jan 27, 2019
5834a2d
spelling: should
jsoref Jan 27, 2019
85b75c7
spelling: similarly
jsoref Jan 27, 2019
68f6d62
spelling: something
jsoref Jan 27, 2019
ca44b4a
spelling: stupidity
jsoref Jan 27, 2019
96881d5
spelling: transferring
jsoref Jan 27, 2019
f39db69
spelling: upgrade
jsoref Jan 27, 2019
2835ba7
spelling: util
jsoref Jan 27, 2019
4e62a98
spelling: version
jsoref Jan 27, 2019
c80f8a2
spelling: vertical
jsoref Jan 27, 2019
6de130e
spelling: visibility
jsoref Jan 27, 2019
816d0fd
spelling: visible
jsoref Jan 27, 2019
f3cf165
spelling: writing
jsoref Jan 27, 2019
06d2411
spelling: wi-fi
jsoref Jan 27, 2019
86a43a0
spelling: william
jsoref Jan 27, 2019
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This is the Sefaria Android app. It is still a work in progress.

Using Android Studio, the java code can be found in Project -> app -> java -> org.sefaria.sefaria.

The activities folder conatins the main code for each of the activities. Simularly, database folder contains classes for data types related to the data and the database. Other folders conatain helper items. For example, TOCElements conatains classes for the different elements that the TOCActivity uses.
The activities folder conatins the main code for each of the activities. Simularly, database folder contains classes for data types related to the data and the database. Other folders contain helper items. For example, TOCElements contains classes for the different elements that the TOCActivity uses.

## Downloading APK
You can download the app on the [play store] (https://play.google.com/store/apps/details?id=org.sefaria.sefaria&hl=en) or you can get the apk directly in [releases] (https://github.com/Sefaria/Sefaria-Android/releases).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public void onClick(DialogInterface dialog, int id) {
builder.setNegativeButton(activity.getString(R.string.no), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dismissCurrentDialog();
//Log.d("dialog","neg aysc click");
//Log.d("dialog","neg aysc (??) click");
showDialog(activity,UPDATE_STARTED);
}
});
Expand Down Expand Up @@ -483,9 +483,9 @@ private static String getString(int messageType){
return "Cancel";
case USING_DATA_MESSAGE:
if(makeItHebrew)
return "You are using mobile data (not WIFI). The update is about 100MB. Do you want to download it anyways?";
return "You are using mobile data (not WIFI). The update is about 100MB. Do you want to download it anyway?";
else
return "You are using mobile data (not WIFI). The update is about 100MB. Do you want to download it anyways?";
return "You are using mobile data (not WIFI). The update is about 100MB. Do you want to download it anyway?";
case USING_DATA_TITLE:
if(makeItHebrew)
return "Using mobile data";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private void addTabsection(List<BilingualNode> nodeList) {
LayoutInflater inflater = (LayoutInflater)
context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);

inflater.inflate(R.layout.tab_divider_menu,tabRoot);
inflater.inflate(R.layout.tab_divideer_menu,tabRoot);
}

MenuButtonTab mbt = new MenuButtonTab(context,menuNode, menuState.getLang());
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/sefaria/sefaria/MyApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected void attachBaseContext(Context base) {
public static final int[] CAT_COLORS = {R.color.tanach, R.color.mishnah,R.color.talmud,
R.color.tosefta,R.color.liturgy,R.color.liturgy,
R.color.philosophy,R.color.chasidut,R.color.musar,
R.color.system_color,R.color.halkhah,R.color.midrash,
R.color.system_color,R.color.halakhah,R.color.midrash,
R.color.kabbalah,R.color.responsa,R.color.parshanut,
R.color.apocrypha,R.color.system_color,R.color.quoting_commentary,
R.color.modern_works,R.color.commentary, R.color.system_color,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public SearchAdapter(Context context, int resourceId, List<Segment> results) {
@Override
public View getView(int position, View view, ViewGroup parent) {
Segment segment = results.get(position);
//Language is exclusively either Hebrew or Enlgihs, depending on which exists in the segment
//Language is exclusively either Hebrew or English, depending on which exists in the segment
Util.Lang lang;
if (segment.getText(langSearchedIn).length() > 0 ){
lang = langSearchedIn;
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/org/sefaria/sefaria/TOCElements/TOCGrid.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ private void init() {
int defaultTab = setCurrSectionText();

//ADD GREY DIVIDER
View divider = new View(context);
View divideer = new View(context);
LinearLayout.LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, 1);
lp.setMargins(0,Math.round(Util.dpToPixels(30)), 0,Math.round(Util.dpToPixels(20)));
divider.setLayoutParams(lp);
divider.setBackgroundColor(Color.parseColor("#CCCCCC"));
this.addView(divider, positionNum++);
divideer.setLayoutParams(lp);
divideer.setBackgroundColor(Color.parseColor("#CCCCCC"));
this.addView(divideer, positionNum++);

tabRoot = makeTabSections(tocNodesRoots);
this.addView(tabRoot, positionNum++);//It's the 3nd view starting with bookTitle and CurrSectionName
Expand Down Expand Up @@ -396,7 +396,7 @@ private LinearLayout makeTabSections(List<Node> nodeList) {
LayoutInflater inflater = (LayoutInflater)
context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);

inflater.inflate(R.layout.tab_divider_menu, tabs);
inflater.inflate(R.layout.tab_divideer_menu, tabs);
}

TOCTab tocTab;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/sefaria/sefaria/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public static String int2heb(int num) {
place++;
}
//now search for 15 & 16 to replace
final String ka = "\u05D9\u05D4"; //carefull...don't join these strings
final String ka = "\u05D9\u05D4"; //careful...don't join these strings
final String ku = "\u05D9\u05D5";
final Pattern kaPatt = Pattern.compile("(" + ka + ")+");
final Pattern kuPatt = Pattern.compile("(" + ku + ")+");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,13 @@ private void addRecentTexts(View view){
else{
recentRoot.removeAllViews();
}
final int columNum = 1;
final int columnNum = 1;
List<MenuDirectRef> recents = Recents.getRecentDirectMenu(getContext(),true, false);
recentTexts = new ArrayList<>();
if(recents.size()>0) {
LinearLayout recentRow = null;
for (int i=0;i<recents.size();i++){
if(i%columNum == 0){
if(i%columnNum == 0){
recentRow = new LinearLayout(getContext());
recentRow.setOrientation(LinearLayout.HORIZONTAL);
recentRow.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void gotoState(State state,View view,LinkFilter linkCount) {
currState = state;
View linkBackButton = view.findViewById(R.id.link_back_btn);
View colorBar = view.findViewById(R.id.main_color_bar);
View topDivider = view.findViewById(R.id.top_divider);
View topDivider = view.findViewById(R.id.top_divideer);
SefariaTextView noLinksTV = (SefariaTextView) view.findViewById(R.id.no_links_tv);
if (state == State.MAIN) {
view.setBackgroundColor(Util.getColor(activity, R.attr.link_bg));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public void clearAllBookSettings(View v){
}

//onclick listener (see xml)
public void debubDBUnlockClick(View view) {
public void debugDBUnlockClick(View view) {
if (numDebugDBUnlockClicks >= TOT_NUM_DEBUG_DB_CLICKS) {
numDebugDBUnlockClicks = 0;
Settings.setIsDebug(!Settings.getIsDebug()); //toggle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ public void onDrawerStateChanged(int newState) {

//this specifically comes before menugrid, b/c in tabs it menugrid does funny stuff to currnode
if (customActionbar == null) {
MenuNode menuNode = new MenuNode("Error (if you see this)","Error (if you see this)",null); //TODO possibly replace this object with a more general bilinual node
MenuNode menuNode = new MenuNode("Error (if you see this)","Error (if you see this)",null); //TODO possibly replace this object with a more general bilingual node
int catColor = book.getCatColor();
if(Settings.getUseAPI()|| true) //findOnPae temp removed for all versions
searchClick = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == COMING_BACK_TO_TOC_REQUEST_CODE) {
if (resultCode == RESULT_CANCELED) {
Log.d("TOCAct","resultCode == RESULT_CANCELED");
cameInFromBackPress = true;// so you know it was a back press from SuperTextActivity (so you know to create a new textActivty
cameInFromBackPress = true;// so you know it was a back press from SuperTextActivity (so you know to create a new textActivity
}
}
}*/
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/sefaria/sefaria/database/Cache.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static String urlToTimeFile(String url,String json){


private static void clearTooManyFiles(){
for(int i=0;i<10;i++){//10 times just so it doesn't accidently run for too long
for(int i=0;i<10;i++){//10 times just so it doesn't accidentally run for too long
long size = 0;
int fileCount = 0;
for (File file : path.listFiles()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ private static boolean shouldOverrideParsha() {
//maybe also use: "shabbat_name": "Shabbat HaGadol"
//Log.d("DailyLearning", "this weeks parsha: " + parsha + "");

//TODO deal with multi part hafotra (have a binder with multi part haf)
//TODO deal with multi part haftara (have a binder with multi part haf)
String fullHaftaraStr = "";
String heFullHaftaraStr = "";
Book firstHaftaraBook = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public static boolean checkDataBase(){
checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY);
}catch(Exception e){
GoogleTracker.sendException(e, "database doesn't exist");
//database does't exist yet.
//database doesn't exist yet.

}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/sefaria/sefaria/database/Header.java
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public static void addHeaders(Context context){
Database dbHandler = Database.getInstance(MyApp.context);
SQLiteDatabase db = dbHandler.getWritableDatabase();
db.execSQL("DROP TABLE IF EXISTS " + TABLE_HEADERS); //TODO be able to update only a bit at a time.
db.execSQL(CREATE_HEADES_TABLE);
db.execSQL(CREATE_HEADES_TABLE /* headers? heads? */);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be headers, but it requires a change to Sefaria-SQL (API)


Log.d("sql_headers_add", "about to add headers");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ private static LinkFilter getCommentaryOnChap(int chapStart, int chapEnd, int bi
* @param count
*/
private void addCommentaryCount(String title, int count, String heTitle, Book parentBook){
if(count == 0) return; //it's not worth trying to go through the whole list testing a match, if this is just zero anyways. (It should never happen that this is 0).
if(count == 0) return; //it's not worth trying to go through the whole list testing a match, if this is just zero anyway. (It should never happen that this is 0).
for(LinkFilter child: children){
if(child.enTitle.equals(title)){
child.count = count;
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/org/sefaria/sefaria/database/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ public String getPath(Util.Lang lang, boolean forURL, boolean includeBook, boole
String separator;
boolean addSpace = true;
/*
if(forURL && node.isRef && "default".equals(node.titleKey)){ //for somethinbg like sefer HaChinach
if(forURL && node.isRef && "default".equals(node.titleKey)){ //for somethinbg like sefer HaChinuch
Log.d("node", "it's default.. " + node);
return
}
Expand Down Expand Up @@ -721,7 +721,7 @@ private static void addSubChaps(Node upperNode, int currDepth, JSONObject jsonOb
}catch (JSONException e1){
all = jsonObject.getJSONObject("default").getJSONObject("_all");//TODO this doesn't actually fix anything
// https://trello.com/c/1trTrZ1S/108-zohar-text-toc-in-parasha-view-doesn-t-show-dappim
// Sefer HaChinkh bug
// Sefer HaChinuch bug
}
counts = all.getJSONArray("availableTexts");
} catch (JSONException e) {
Expand Down Expand Up @@ -955,7 +955,7 @@ private static String talmudFormatConverter(String input){
return input;
}

private List<Segment> getTextsFromAPI() throws API.APIException{ //(String booktitle, int []levels)
private List<Segment> getTextsFromAPI() throws API.APIException{ //(String bookTitle, int []levels)
String data = getTextFromAPIData();
boolean isTalmudBavli;
try {
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/org/sefaria/sefaria/database/SearchingDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static ArrayList<Integer> JHpacketToNums (byte [] bytes) {
for(int i = 0;i< bytes.length/4;i++){
int a = (Integer.valueOf(bytes[i*4]) & 0xff)*BITS_PER_PACKET; //0xff should remove the negative from byte
if(a < 0){
Log.e("searching", "bad byte ocnvertion..");
Log.e("searching", "bad byte conversion..");
}
int bitNum = 0;
for(int j = 3; j >=1;j--){
Expand Down Expand Up @@ -293,7 +293,7 @@ private static String replace_(boolean wholeWord){
private static String replacePer(boolean wholeWord){
//if(wholeWord)
return "[^\\s\u05be]*";//it's not perfect, but basically it's saying as long as there's no space in between it's good
//else return ".*?"; //you might want this for not whole words... but then it basically gets eberything
//else return ".*?"; //you might want this for not whole words... but then it basically gets everything


}
Expand Down Expand Up @@ -353,7 +353,7 @@ public static List<Segment> findWordsInList(List<Segment> list, String word, boo
enPattern = Pattern.compile(word.replaceAll("_", ".").replaceAll("%", ".*"),Pattern.CASE_INSENSITIVE); //make case insensitive
else
enPattern = Pattern.compile(word.replaceAll("_", replace_(false)).replaceAll("%", replacePer(false)),Pattern.CASE_INSENSITIVE); //make case insensitive
}catch(Exception e){//maybe try excaping the regex
}catch(Exception e){//maybe try escaping the regex
enPattern = Pattern.compile("");
Toast.makeText(MyApp.getContext(), MyApp.getContext().getString(R.string.error_parsing_query), Toast.LENGTH_SHORT).show();
}
Expand Down Expand Up @@ -693,7 +693,7 @@ private ArrayList<Segment> searchDBheTexts() {
do {
Segment segment = new Segment(cursor);

//if(verse.length() > 4000) continue;//TODO this is a major hackk!!, but we aren't searching huge things
//if(verse.length() > 4000) continue;//TODO this is a major hack!!, but we aren't searching huge things

String verse = segment.getText(Util.Lang.HE);
boolean foundAllWords = true;
Expand All @@ -704,7 +704,7 @@ private ArrayList<Segment> searchDBheTexts() {
break;
}
}
if(foundAllWords) { //divided into different parts so the addingHighlighting doesn't need to run each time
if(foundAllWords) { //divideed into different parts so the addingHighlighting doesn't need to run each time
for (int j = 0; j < words.length; j++) {
verse = segment.getText(Util.Lang.HE);
Matcher m = patterns[j].matcher(verse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void setMenuBtnLang(Util.Lang lang) {

if (lang == Util.Lang.HE) {
tv.setText("A");
tv.setFont(Util.Lang.EN, true,getResources().getDimension(R.dimen.custom_action_bar_lang_font_size), TypedValue.COMPLEX_UNIT_PX);//using pixels b/c when using getDimentions it actually converts to pixels
tv.setFont(Util.Lang.EN, true,getResources().getDimension(R.dimen.custom_action_bar_lang_font_size), TypedValue.COMPLEX_UNIT_PX);//using pixels b/c when using getDimensions it actually converts to pixels
}
else /* if (lang == Util.Lang.EN) */ {
tv.setText("א");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public SefariaTextView(Context context, AttributeSet attributeSet) {

if(lang == Util.Lang.HE) {
//don't do italics when it's Hebrew b/c it's weird.
// Honestly this b/c of william D Talmud and if there's something else that needs it we can chaneg this
// Honestly this b/c of william D Talmud and if there's something else that needs it we can change this
style = null;
}
setFont(lang, isSerif, -1, TypedValue.COMPLEX_UNIT_SP, style);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
android:gravity="center"
android:padding="1dp"
android:textColor="?text_color_soft"
android:onClick="debubDBUnlockClick"
android:onClick="debugDBUnlockClick"
android:clickable="true"/>
<org.sefaria.sefaria.layouts.SefariaTextView
android:id="@+id/offlineInfo"
Expand All @@ -293,7 +293,7 @@
android:padding="1dp"
app:lang="system"
android:textColor="?text_color_soft"
android:onClick="debubDBUnlockClick"
android:onClick="debugDBUnlockClick"
android:clickable="true"/>

</LinearLayout>
Expand Down
Loading