Commit e1220c44 authored by Dave Griffiths's avatar Dave Griffiths

medium last minute changes...

parent 380a56e3
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="foam.symbai"
android:versionCode="13"
android:versionCode="14"
android:versionName="1.0">
<application android:label="@string/app_name"
android:icon="@drawable/logo"
......
......@@ -295,9 +295,12 @@
(string-append url "fn=file-list")
(lambda (file-list)
(let ((r (sync-files file-list)))
(when (not (null? r))
(set-current! 'upload 0)
(debug! "Found a mismatch with files on raspberry pi - fixing..."))
(cond
((not (null? r))
(set-current! 'mismatch 0)
(debug! "Found a mismatch with files on raspberry pi - fixing..."))
(else
(set-current! 'mismatch 1)))
r)))))
......@@ -438,11 +441,15 @@
((null? new-entity-requests)
(debug! "No new data to download")
(set-current! 'download 1)
(append
(if (eqv? (get-current 'upload 0) 1)
(list (play-sound "ping")) '())
(list
(toast "No new data to download"))))
(msg "-->")
(msg (get-current 'upload 0))
(msg (get-current 'mismatch 0))
(if (and
;; (eqv? (get-current 'upload 0) 1) won't have got here if uploading still
(eqv? (get-current 'mismatch 0) 1))
(list
(play-sound "ping")
(toast "I'm synced with the Raspberry Pi"))))
(else
(debug! (string-append
"Requesting "
......@@ -484,11 +491,8 @@
(else
(debug! "No data changed to upload")
(set-current! 'upload 1)
(append
(if (eqv? (get-current 'download 0) 1)
(list (play-sound "ping")) '())
(list
(toast "No data changed to upload"))))) r))))))
(list
(toast "No data changed to upload"))))) r)))))
(define (connect-to-net fn)
(list
......
This diff is collapsed.
This diff is collapsed.
......@@ -4,10 +4,10 @@
(list 'next (list "Next" ))
(list 'yes (list "Yes" ))
(list 'no (list "No" ))
(list 'not-answered (list "Unanswered" ))
(list 'dwta (list "DWTA" ))
(list 'not-set (list "Not set" ))
(list 'years-old (list " years old"))
(list 'birth-year (list "Birth year"))
(list 'birth-year (list "Birth year/Age"))
(list 'agree-record (list "Record"))
(list 'agree-playback (list "Play"))
(list 'photo-agree-record (list "Record"))
......@@ -16,10 +16,12 @@
(list 'photo-agreement-text (list "Photo agreement text here..."))
(list 'household-agreement-text (list "Household agreement text here..."))
(list 'locality (list "Locality"))
(list 'num-male-adults (list "Num male adults"))
(list 'num-female-adults (list "Num female adults"))
(list 'num-male-children (list "Num male children"))
(list 'num-female-children (list "Num female children"))
(list 'num-adults (list "Total adults"))
(list 'num-male-adults (list "Male adults"))
(list 'num-female-adults (list "Female adults"))
(list 'num-children (list "Total children"))
(list 'num-male-children (list "Male children"))
(list 'num-female-children (list "Female children"))
(list 'mother-name (list "Mother name"))
(list 'father-name (list "Father name"))
(list 'mother-alive (list "Alive"))
......@@ -132,7 +134,7 @@
(list 'children (list "Children" "" ))
(list 'male (list "Male" "Shynrang" ))
(list 'female (list "Female" "Kynthei" ))
(list 'num-pots (list "Number of pots" "" ))
(list 'num-pots (list "Num pots/cooking fires" "" ))
(list 'adults (list "Adults" "" ))
(list 'add-individual (list "Add individual" "" ))
(list 'default-individual-name (list "A person" "" ))
......@@ -142,24 +144,25 @@
(list 'photo-id-display (list "Photo ID" "Nombor dur ID" ))
(list 'family-display (list "Family" "Family/Clan" ))
(list 'details-button (list "Details" "" ))
(list 'family-button (list "Family" "Family/Clan" ))
(list 'family-button (list "Marriage" ))
(list 'migration-button (list "Migration" "" ))
(list 'friendship-button (list "Friendship" ))
(list 'income-button (list "Income" "" ))
(list 'friendship-button (list "Friendships" ))
(list 'income-button (list "Income/Markets" "" ))
(list 'genealogy-button (list "Genealogy" "" ))
(list 'social-button (list "Social" "" ))
(list 'social-button (list "Prestige/Knowledge" "" ))
(list 'household-agreement-button (list "Agreement" "" ))
(list 'photo-agreement-button (list "Agreement" "" ))
(list 'general-agreement-button (list "Agreement" "" ))
(list 'is-a-child (list "Child" "" ))
(list 'change-photo (list "Change photo" "" ))
(list 'details-name (list "Name" "Kyrteng" ))
(list 'details-first-name (list "Name" "Kyrteng" ))
(list 'details-first-name (list "First name" "Kyrteng" ))
(list 'details-photo-id (list "Photo ID" "Nombor dur ID" ))
(list 'details-family (list "Family" "" ))
(list 'details-family (list "Family name" "" ))
(list 'tribe (list "Tribe" "Jaidbynriew:" ))
(list 'sub-tribe (list "Sub tribe" "Tynrai Jaidbynriew" ))
(list 'khasi (list "Khasi" "" ))
(list 'pahari-korwa (list "Pahari Korwa"))
(list 'khynriam (list "Khynriam" "" ))
(list 'pnar (list "Pnar" "" ))
(list 'bhoi (list "Bhoi" "" ))
......@@ -178,12 +181,11 @@
(list 'spouse (list "Spouse" "" ))
(list 'change-id (list "Change" "" ))
(list 'head-of-house (list "Head of house" "" ))
(list 'marital-status (list "Marital status" "" ))
(list 'ever-married (list "Ever married" "" ))
(list 'marital-status (list "Current marital status" "" ))
(list 'currently-married (list "Currently married" "" ))
(list 'currently-single (list "Currently single" "" ))
(list 'seperated (list "Seperated/divorced" "" ))
(list 'times-married (list "How many times married" "" ))
(list 'times-married (list "Number of times married" "" ))
(list 'change-spouse (list "Change/add spouse" "" ))
(list 'children-living (list "Living" "" ))
(list 'children-dead (list "Dead" "" ))
......@@ -192,12 +194,9 @@
(list 'residence-after-marriage (list "Residence after marriage" "" ))
(list 'birthplace (list "Birthplace" "" ))
(list 'spouse-village (list "Spouses natal village" "" ))
(list 'num-siblings (list "Number of living siblings of the same sex born from same mother" "" ))
(list 'birth-order (list "Birth order amoung currently living same sex siblings born from same mother" "" ))
(list 'length-time (list "Length of time lived in this village (years)" "" ))
(list 'place-of-birth (list "Place of birth" "" ))
(list 'num-residence-changes (list "Number of time place of residence changed since birth" "" ))
(list 'village-visits-month (list "Number of times you have visited another village in the last month" "" ))
(list 'num-residence-changes (list "Number of different places lived since birth" "" ))
(list 'village-visits-month (list "Number of times you have visited another village in the previous month" "" ))
(list 'village-visits-year (list "Number of times you have visited another village in the last year (i.e. between last summer and this summer)" "" ))
(list 'occupation (list "Occupation" "" ))
(list 'occupation (list "Occupation" "" ))
......@@ -217,18 +216,18 @@
(list 'concrete (list "Concrete" "" ))
(list 'tin (list "Tin" "" ))
(list 'thatched (list "Thatched" "" ))
(list 'loan (list "Outstanding loans" "" ))
(list 'earning (list "How much do you earn for one day's labour?" "" ))
(list 'loan (list "How much outstanding loan money have you taken in all, from any source at this time? (Rupees)" "" ))
(list 'earning (list "How much do you earn for one day's labour? (Rupees)" "" ))
(list 'in-the-home (list "In the home" "" ))
(list 'radio (list "Radio" "" ))
(list 'tv (list "TV" "" ))
(list 'mobile (list "Mobile phone" "" ))
(list 'visit-market (list "How many times do you visit the tribal market?" "" ))
(list 'town-sell (list "How many times a month do you visit your nearest city or town to buy or sell something?" "" ))
(list 'visit-market (list "How many times in the previous month did you visit the tribal market?" "" ))
(list 'town-sell (list "How many times in the previous month did you visit your nearest city or town to buy or sell something?" "" ))
(list 'default-crop-name (list "crop" "" ))
(list 'crop-name (list "Crop name" "" ))
(list 'crop-unit (list "Crop unit" "" ))
(list 'crop-used (list "Used or eaten" "" ))
(list 'crop-used (list "Eaten or fed to livestock" "" ))
(list 'crop-sold (list "Sold" "" ))
(list 'crop-seed (list "Seed" "" ))
(list 'mother (list "Mother" "" ))
......@@ -288,14 +287,33 @@
(list 'gps-are-you-sure (list "Are you sure you want to record your current position?" ))
(list 'gps-are-you-sure-2 (list "Please confirm again..." ))
(list 'current-village (list "Your current village" ))
(list 'num-children (list "Number of children" ))
(list 'occupation-agriculture (list "Agriculture" ))
(list 'occupation-gathering (list "Gathering" ))
(list 'occupation-labour (list "Labour" ))
(list 'occupation-labour (list "Daily wage labour" ))
(list 'occupation-cows (list "Cows" ))
(list 'occupation-fishing (list "Fishing" ))
(list 'occupation-other (list "Other" ))
(list 'friendship-question (list "LIST UP TO FIVE PERSONS whom you have really liked to talk to in the last year. They can be of either sex. They can be friend, neighbours, relatives, co-wives; they can live in this village or elsewhere; anyone you like to talk to." "" ))
(list 'prestige-question (list "LIST UP TO FIVE PERSONS who you think are the most respected in the village:" ))
(list 'knowledge-question (list "LIST UP TO FIVE PERSONS who you think are the most knowledgeable in the village:" ))
(list 'local-dialect (list "Local dialects spoken"))
(list 'market-frequency (list "Frequency of tribal market (per week)"))
(list 'crop-prices (list "Price of crops grown per unit"))
(list 'game-played (list "Game played?"))
(list 'game-id (list "Game ID"))
(list 'game-date (list "Game date"))
(list 'ever-married (list "Ever married?"))
(list 'since-birth (list "Since birth"))
(list 'length-time-desc (list "Length of time lived in this village"))
(list 'length-time (list "Length of time lived in this village (years)" "" ))
(list 'residences (list "Names of different places lived since birth"))
(list 'income-notes (list "Income notes"))
(list 'crop-produced (list "Quantity produced"))
(list 'crop-given (list "Given to others"))
(list 'social-answered (list "Answer supplied?"))
(list 'friendship-answered (list "Answer supplied?"))
(list 'chooser-no-selection (list "Clear"))
))
......@@ -87,8 +87,6 @@ public class starwisp extends StarwispActivity
@Override
public void onCreate(Bundle savedInstanceState)
{
setContentView(R.layout.main);
String dirname = "symbai/";
m_AppDir = "/sdcard/"+dirname;
File appdir = new File(m_AppDir);
......
......@@ -88,7 +88,7 @@
(else str)))
(define csv "\"test-num\",1,1,1,\" \"\n\"one\",34,\"32\", one two, \n \"three four\", 4, 5" )
(define (csv->list csv)
(map
(lambda (line)
......@@ -103,19 +103,41 @@
(display (foldl
(lambda (l r)
(if (null? l) r
(string-append
(string-append
r
"(list '" (car l) " (list "
(apply string-append
(map
"(list '" (car l) " (list "
(apply string-append
(map
(lambda (s) (string-append "\"" (trim s) "\" "))
(cdr l)))
"))\n" )))
""
(csv->list (file->string "translations.csv"))))
(csv->list (file->string "translations.csv"))))
;(csv->list csv)
;(word-gen)
;------------------------------------------------------
(define (list->string l)
(foldl
(lambda (l r)
(string-append r ", \"" l "\""))
""
l))
(define (list->csv l)
(foldl
(lambda (l r)
(string-append r (symbol->string (car l)) (list->string (cadr l)) "\n"))
""
l))
(define i18n-text
(list
))
;(display (list->csv i18n-text))
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment