@@ -87,30 +87,30 @@ discard block |
||
87 | 87 | Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
88 | 88 | |
89 | 89 | switch ($mod_action) { |
90 | - case 'admin_config': |
|
91 | - $this->config(); |
|
92 | - break; |
|
93 | - case 'flags': |
|
94 | - $this->flags(); |
|
95 | - break; |
|
96 | - case 'pedigree_map': |
|
97 | - $this->pedigreeMap(); |
|
98 | - break; |
|
99 | - case 'admin_placecheck': |
|
100 | - $this->adminPlaceCheck(); |
|
101 | - break; |
|
102 | - case 'admin_places': |
|
103 | - $this->adminPlaces(); |
|
104 | - break; |
|
105 | - case 'places_edit': |
|
106 | - $this->placesEdit(); |
|
107 | - break; |
|
108 | - case 'wt_street_view': |
|
109 | - $this->wtStreetView(); |
|
110 | - break; |
|
111 | - default: |
|
112 | - http_response_code(404); |
|
113 | - break; |
|
90 | + case 'admin_config': |
|
91 | + $this->config(); |
|
92 | + break; |
|
93 | + case 'flags': |
|
94 | + $this->flags(); |
|
95 | + break; |
|
96 | + case 'pedigree_map': |
|
97 | + $this->pedigreeMap(); |
|
98 | + break; |
|
99 | + case 'admin_placecheck': |
|
100 | + $this->adminPlaceCheck(); |
|
101 | + break; |
|
102 | + case 'admin_places': |
|
103 | + $this->adminPlaces(); |
|
104 | + break; |
|
105 | + case 'places_edit': |
|
106 | + $this->placesEdit(); |
|
107 | + break; |
|
108 | + case 'wt_street_view': |
|
109 | + $this->wtStreetView(); |
|
110 | + break; |
|
111 | + default: |
|
112 | + http_response_code(404); |
|
113 | + break; |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | |
@@ -1186,24 +1186,24 @@ discard block |
||
1186 | 1186 | if ($latlongval[$i] == $latlongval[$k]) { |
1187 | 1187 | $dups++; |
1188 | 1188 | switch ($dups) { |
1189 | - case 1: |
|
1190 | - $marker_number = $curgen . 'L'; |
|
1191 | - break; |
|
1192 | - case 2: |
|
1193 | - $marker_number = $curgen . 'R'; |
|
1194 | - break; |
|
1195 | - case 3: |
|
1196 | - $marker_number = $curgen . 'Ls'; |
|
1197 | - break; |
|
1198 | - case 4: |
|
1199 | - $marker_number = $curgen . 'Rs'; |
|
1200 | - break; |
|
1201 | - case 5: //adjust position where markers have same coodinates |
|
1202 | - default: |
|
1203 | - $marker_number = $curgen; |
|
1204 | - $lon[$i] += 0.0025; |
|
1205 | - $lat[$i] += 0.0025; |
|
1206 | - break; |
|
1189 | + case 1: |
|
1190 | + $marker_number = $curgen . 'L'; |
|
1191 | + break; |
|
1192 | + case 2: |
|
1193 | + $marker_number = $curgen . 'R'; |
|
1194 | + break; |
|
1195 | + case 3: |
|
1196 | + $marker_number = $curgen . 'Ls'; |
|
1197 | + break; |
|
1198 | + case 4: |
|
1199 | + $marker_number = $curgen . 'Rs'; |
|
1200 | + break; |
|
1201 | + case 5: //adjust position where markers have same coodinates |
|
1202 | + default: |
|
1203 | + $marker_number = $curgen; |
|
1204 | + $lon[$i] += 0.0025; |
|
1205 | + $lat[$i] += 0.0025; |
|
1206 | + break; |
|
1207 | 1207 | } |
1208 | 1208 | } |
1209 | 1209 | } |
@@ -3055,22 +3055,22 @@ discard block |
||
3055 | 3055 | <?php |
3056 | 3056 | $coordsAsStr = array(); |
3057 | 3057 | switch (strtoupper($place_name)) { |
3058 | - case 'ENGLAND': |
|
3059 | - $coordsAsStr[] = '-4.74361,50.66750|-4.78361,50.59361|-4.91584,50.57722|-5.01750,50.54264|-5.02569,50.47271|-5.04729,50.42750|-5.15208,50.34374|-5.26805,50.27389|-5.43194,50.19326|-5.49584,50.21695|-5.54639,50.20527|-5.71000,50.12916|-5.71681,50.06083|-5.66174,50.03631|-5.58278,50.04777|-5.54166,50.07055|-5.53416,50.11569|-5.47055,50.12499|-5.33361,50.09138|-5.27666,50.05972|-5.25674,50.00514|-5.19306,49.95527|-5.16070,50.00319|-5.06555,50.03750|-5.07090,50.08166|-5.04806,50.17111|-4.95278,50.19333|-4.85750,50.23166|-4.76250,50.31138|-4.67861,50.32583|-4.54334,50.32222|-4.48278,50.32583|-4.42972,50.35139|-4.38000,50.36388|-4.16555,50.37028|-4.11139,50.33027|-4.05708,50.29791|-3.94389,50.31346|-3.87764,50.28139|-3.83653,50.22972|-3.78944,50.21222|-3.70666,50.20972|-3.65195,50.23111|-3.55139,50.43833|-3.49416,50.54639|-3.46181,50.58792|-3.41139,50.61610|-3.24416,50.67444|-3.17347,50.68833|-3.09445,50.69222|-2.97806,50.70638|-2.92750,50.73125|-2.88278,50.73111|-2.82305,50.72027|-2.77139,50.70861|-2.66195,50.67334|-2.56305,50.63222|-2.45861,50.57500|-2.44666,50.62639|-2.39097,50.64166|-2.19722,50.62611|-2.12195,50.60722|-2.05445,50.58569|-1.96437,50.59674|-1.95441,50.66536|-2.06681,50.71430|-1.93416,50.71277|-1.81639,50.72306|-1.68445,50.73888|-1.59278,50.72416|-1.33139,50.79138|-1.11695,50.80694|-1.15889,50.84083|-1.09445,50.84584|-0.92842,50.83966|-0.86584,50.79965|-0.90826,50.77396|-0.78187,50.72722|-0.74611,50.76583|-0.67528,50.78111|-0.57722,50.79527|-0.25500,50.82638|-0.19084,50.82583|-0.13805,50.81833|0.05695,50.78083|0.12334,50.75944|0.22778,50.73944|0.28695,50.76500|0.37195,50.81638|0.43084,50.83111|0.56722,50.84777|0.67889,50.87681|0.71639,50.90500|0.79334,50.93610|0.85666,50.92556|0.97125,50.98111|0.99778,51.01903|1.04555,51.04944|1.10028,51.07361|1.26250,51.10166|1.36889,51.13583|1.41111,51.20111|1.42750,51.33111|1.38556,51.38777|1.19195,51.37861|1.05278,51.36722|0.99916,51.34777|0.90806,51.34069|0.70416,51.37749|0.61972,51.38304|0.55945,51.40596|0.64236,51.44042|0.69750,51.47084|0.59195,51.48777|0.53611,51.48806|0.48916,51.48445|0.45215,51.45562|0.38894,51.44822|0.46500,51.50306|0.65195,51.53680|0.76695,51.52138|0.82084,51.53556|0.87528,51.56110|0.95250,51.60923|0.94695,51.72556|0.90257,51.73465|0.86306,51.71166|0.76140,51.69164|0.70111,51.71847|0.86211,51.77361|0.93236,51.80583|0.98278,51.82527|1.03569,51.77416|1.08834,51.77056|1.13222,51.77694|1.18139,51.78972|1.22361,51.80888|1.26611,51.83916|1.28097,51.88096|1.20834,51.95083|1.16347,52.02361|1.27750,51.98555|1.33125,51.92875|1.39028,51.96999|1.58736,52.08388|1.63000,52.19527|1.68576,52.32630|1.73028,52.41138|1.74945,52.45583|1.74590,52.62021|1.70250,52.71583|1.64528,52.77111|1.50361,52.83749|1.43222,52.87472|1.35250,52.90972|1.28222,52.92750|1.18389,52.93889|0.99472,52.95111|0.94222,52.95083|0.88472,52.96638|0.66722,52.97611|0.54778,52.96618|0.49139,52.93430|0.44431,52.86569|0.42903,52.82403|0.36334,52.78027|0.21778,52.80694|0.16125,52.86250|0.05778,52.88916|0.00211,52.87985|0.03222,52.91722|0.20389,53.02805|0.27666,53.06694|0.33916,53.09236|0.35389,53.18722|0.33958,53.23472|0.23555,53.39944|0.14347,53.47527|0.08528,53.48638|0.02694,53.50972|-0.10084,53.57306|-0.20722,53.63083|-0.26445,53.69083|-0.30166,53.71319|-0.39022,53.70794|-0.51972,53.68527|-0.71653,53.69638|-0.65445,53.72527|-0.60584,53.72972|-0.54916,53.70611|-0.42261,53.71755|-0.35728,53.73056|-0.29389,53.73666|-0.23139,53.72166|-0.10584,53.63166|-0.03472,53.62555|0.04416,53.63916|0.08916,53.62666|0.14945,53.58847|0.12639,53.64527|0.06264,53.70389|-0.12750,53.86388|-0.16916,53.91847|-0.21222,54.00833|-0.20569,54.05153|-0.16111,54.08806|-0.11694,54.13222|-0.20053,54.15171|-0.26250,54.17444|-0.39334,54.27277|-0.42166,54.33222|-0.45750,54.37694|-0.51847,54.44749|-0.56472,54.48000|-0.87584,54.57027|-1.06139,54.61722|-1.16528,54.64972|-1.30445,54.77138|-1.34556,54.87138|-1.41278,54.99944|-1.48292,55.08625|-1.51500,55.14972|-1.56584,55.28722|-1.58097,55.48361|-1.63597,55.58194|-1.69000,55.60556|-1.74695,55.62499|-1.81764,55.63306|-1.97681,55.75416|-2.02166,55.80611|-2.08361,55.78054|-2.22000,55.66499|-2.27916,55.64472|-2.27416,55.57527|-2.21528,55.50583|-2.18278,55.45985|-2.21236,55.42777|-2.46305,55.36111|-2.63055,55.25500|-2.69945,55.17722|-2.96278,55.03889|-3.01500,55.05222|-3.05103,54.97986|-3.13292,54.93139|-3.20861,54.94944|-3.28931,54.93792|-3.39166,54.87639|-3.42916,54.81555|-3.56916,54.64249|-3.61306,54.48861|-3.49305,54.40333|-3.43389,54.34806|-3.41056,54.28014|-3.38055,54.24444|-3.21472,54.09555|-3.15222,54.08194|-2.93097,54.15333|-2.81361,54.22277|-2.81750,54.14277|-2.83361,54.08500|-2.93250,53.95055|-3.05264,53.90764|-3.03708,53.74944|-2.99278,53.73277|-2.89979,53.72499|-2.97729,53.69382|-3.07306,53.59805|-3.10563,53.55993|-3.00678,53.41738|-2.95389,53.36027|-2.85736,53.32083|-2.70493,53.35062|-2.77639,53.29250|-2.89972,53.28916|-2.94250,53.31056|-3.02889,53.38191|-3.07248,53.40936|-3.16695,53.35708|-3.12611,53.32500|-3.08860,53.26001|-3.02000,53.24722|-2.95528,53.21555|-2.91069,53.17014|-2.89389,53.10416|-2.85695,53.03249|-2.77792,52.98514|-2.73109,52.96873|-2.71945,52.91902|-2.79278,52.90207|-2.85069,52.93875|-2.99389,52.95361|-3.08639,52.91611|-3.13014,52.88486|-3.13708,52.79312|-3.06806,52.77027|-3.01111,52.71166|-3.06666,52.63527|-3.11750,52.58666|-3.07089,52.55702|-3.00792,52.56902|-2.98028,52.53083|-3.02736,52.49792|-3.11916,52.49194|-3.19514,52.46722|-3.19611,52.41027|-3.02195,52.34027|-2.95486,52.33117|-2.99750,52.28139|-3.05125,52.23347|-3.07555,52.14804|-3.12222,52.11805|-3.11250,52.06945|-3.08500,52.01930|-3.04528,51.97639|-2.98889,51.92555|-2.91757,51.91569|-2.86639,51.92889|-2.77861,51.88583|-2.65944,51.81806|-2.68334,51.76957|-2.68666,51.71889|-2.66500,51.61500|-2.62916,51.64416|-2.57889,51.67777|-2.46056,51.74666|-2.40389,51.74041|-2.47166,51.72445|-2.55305,51.65722|-2.65334,51.56389|-2.77055,51.48916|-2.85278,51.44472|-2.96000,51.37499|-3.00695,51.30722|-3.01278,51.25632|-3.02834,51.20611|-3.30139,51.18111|-3.39361,51.18138|-3.43729,51.20638|-3.50722,51.22333|-3.57014,51.23027|-3.63222,51.21805|-3.70028,51.23000|-3.79250,51.23916|-3.88389,51.22416|-3.98472,51.21695|-4.11666,51.21222|-4.22805,51.18777|-4.22028,51.11054|-4.23702,51.04659|-4.30361,51.00416|-4.37639,50.99110|-4.42736,51.00958|-4.47445,51.01416|-4.52132,51.01424|-4.54334,50.92694|-4.56139,50.77625|-4.65139,50.71527|-4.74361,50.66750'; |
|
3060 | - break; |
|
3061 | - case 'SCOTLAND': |
|
3062 | - $coordsAsStr[] = '-2.02166,55.80611|-2.07972,55.86722|-2.13028,55.88583|-2.26028,55.91861|-2.37528,55.95694|-2.65722,56.05972|-2.82028,56.05694|-2.86618,56.02840|-2.89555,55.98861|-2.93500,55.96944|-3.01805,55.94944|-3.06750,55.94444|-3.25472,55.97166|-3.45472,55.99194|-3.66416,56.00652|-3.73722,56.05555|-3.57139,56.05360|-3.44111,56.01916|-3.39584,56.01083|-3.34403,56.02333|-3.13903,56.11084|-2.97611,56.19472|-2.91666,56.20499|-2.84695,56.18638|-2.78805,56.18749|-2.67937,56.21465|-2.58403,56.28264|-2.67208,56.32277|-2.76861,56.33180|-2.81528,56.37360|-2.81208,56.43958|-2.91653,56.45014|-2.99555,56.41416|-3.19042,56.35958|-3.27805,56.35750|-3.04055,56.45472|-2.95861,56.45611|-2.72084,56.48888|-2.64084,56.52250|-2.53126,56.57611|-2.48861,56.61416|-2.47805,56.71527|-2.39000,56.77166|-2.31986,56.79638|-2.21972,56.86777|-2.19708,56.94388|-2.16695,57.00055|-2.09334,57.07027|-2.05416,57.21861|-1.95889,57.33250|-1.85584,57.39889|-1.77334,57.45805|-1.78139,57.50555|-1.82195,57.57861|-1.86000,57.62138|-1.92972,57.67777|-2.02222,57.69388|-2.07555,57.69944|-2.14028,57.69056|-2.18611,57.66861|-2.39626,57.66638|-2.51000,57.67166|-2.78639,57.70222|-2.89806,57.70694|-2.96750,57.68027|-3.03847,57.66249|-3.12334,57.67166|-3.22334,57.69166|-3.28625,57.72499|-3.33972,57.72333|-3.48805,57.70945|-3.52222,57.66333|-3.59542,57.63666|-3.64063,57.63881|-3.75414,57.62504|-4.03986,57.55569|-4.19666,57.48584|-4.22889,57.51554|-4.17945,57.56249|-4.11139,57.59833|-4.08078,57.66533|-4.19139,57.67139|-4.25945,57.65527|-4.34361,57.60777|-4.41639,57.60166|-4.29666,57.67444|-4.08528,57.72611|-4.01908,57.70226|-3.96861,57.70250|-3.86556,57.76861|-3.81945,57.80458|-3.80681,57.85819|-3.85055,57.82000|-3.92639,57.80749|-4.04322,57.81438|-4.14973,57.82527|-4.29750,57.84638|-4.36250,57.89777|-4.24306,57.87028|-4.10666,57.85195|-4.01500,57.86777|-3.99166,57.90611|-3.99695,57.95056|-3.84500,58.02000|-3.56611,58.13916|-3.51319,58.16374|-3.45916,58.20305|-3.42028,58.24361|-3.33750,58.27694|-3.20555,58.30625|-3.10972,58.38166|-3.05792,58.45083|-3.02264,58.64653|-3.17639,58.64944|-3.35389,58.66055|-3.36931,58.59555|-3.57611,58.62194|-3.66028,58.61972|-3.71166,58.60374|-3.78264,58.56750|-3.84834,58.56000|-4.08056,58.55527|-4.27722,58.53361|-4.43653,58.54902|-4.50666,58.56777|-4.56055,58.57584|-4.59910,58.53027|-4.66805,58.48833|-4.76146,58.44604|-4.70195,58.50999|-4.70166,58.55861|-4.77014,58.60264|-5.00153,58.62416|-5.10945,58.50833|-5.16472,58.32527|-5.12639,58.28750|-5.07166,58.26472|-5.20361,58.25083|-5.39764,58.25055|-5.27389,58.11722|-5.31514,58.06416|-5.38416,58.08361|-5.45285,58.07416|-5.39805,58.03111|-5.26278,57.97111|-5.19334,57.95069|-5.12750,57.86944|-5.21750,57.90084|-5.33861,57.92083|-5.42876,57.90104|-5.45750,57.85889|-5.64445,57.89972|-5.62555,57.85222|-5.58153,57.81945|-5.60674,57.76618|-5.66305,57.78889|-5.71695,57.86944|-5.76695,57.86472|-5.81708,57.81944|-5.81084,57.63958|-5.69555,57.55944|-5.64361,57.55222|-5.53084,57.52833|-5.65305,57.50875|-5.75000,57.54834|-5.81569,57.57923|-5.85042,57.54972|-5.86695,57.46777|-5.81806,57.36250|-5.75111,57.34333|-5.50334,57.40111|-5.45126,57.41805|-5.49250,57.37083|-5.59884,57.33049|-5.57116,57.28411|-5.51266,57.27745|-5.40514,57.23097|-5.44972,57.22138|-5.49472,57.23888|-5.56066,57.25477|-5.64611,57.23499|-5.64751,57.16161|-5.55028,57.11639|-5.48166,57.11222|-5.40305,57.11062|-5.55945,57.09250|-5.65111,57.11611|-5.72472,57.11306|-5.77361,57.04556|-5.63139,56.98499|-5.56916,56.98972|-5.52403,56.99735|-5.57916,56.98000|-5.64611,56.97222|-5.73374,57.00909|-5.82584,57.00346|-5.91958,56.88708|-5.86528,56.87944|-5.74278,56.89374|-5.66292,56.86924|-5.73306,56.83916|-5.78584,56.83955|-5.85590,56.81430|-5.80208,56.79180|-5.84958,56.74444|-5.90500,56.75666|-5.96694,56.78027|-6.14000,56.75777|-6.19208,56.74888|-6.23452,56.71673|-6.19139,56.67972|-5.91916,56.67388|-5.82622,56.69156|-5.73945,56.71166|-5.55240,56.68886|-5.64861,56.68027|-5.69916,56.68278|-5.88261,56.65666|-5.97472,56.65138|-5.99584,56.61138|-5.93056,56.56972|-5.88416,56.55333|-5.79056,56.53805|-5.67695,56.49389|-5.56389,56.54056|-5.36334,56.66195|-5.23416,56.74333|-5.13236,56.79403|-5.31473,56.65666|-5.37405,56.55925|-5.31826,56.55633|-5.25080,56.55753|-5.37718,56.52112|-5.39866,56.47866|-5.19111,56.46194|-5.11556,56.51277|-5.07014,56.56069|-5.13555,56.48499|-5.22084,56.43583|-5.32764,56.43574|-5.42439,56.43091|-5.52611,56.37360|-5.57139,56.32833|-5.59653,56.25695|-5.57389,56.16000|-5.52000,56.16485|-5.56334,56.11333|-5.60139,56.07638|-5.64222,56.04305|-5.66039,55.98263|-5.62555,56.02055|-5.58014,56.01319|-5.63361,55.96611|-5.67697,55.88844|-5.64750,55.78139|-5.60986,55.75930|-5.66916,55.66166|-5.70166,55.58861|-5.71805,55.51500|-5.75916,55.41750|-5.79528,55.36027|-5.78166,55.29902|-5.73778,55.29222|-5.56694,55.31666|-5.51528,55.36347|-5.55520,55.41440|-5.48639,55.64306|-5.44597,55.70680|-5.38000,55.75027|-5.41889,55.90666|-5.39924,55.99972|-5.33895,56.03456|-5.30594,56.06922|-5.23889,56.11889|-5.03222,56.23250|-4.92229,56.27111|-4.97416,56.23333|-5.07222,56.18695|-5.20069,56.11861|-5.30906,56.00570|-5.34000,55.90201|-5.29250,55.84750|-5.20805,55.84444|-5.22458,55.90175|-5.17334,55.92916|-5.11000,55.90306|-5.01222,55.86694|-4.96195,55.88000|-4.89824,55.98145|-4.84623,56.08632|-4.86636,56.03178|-4.85461,55.98648|-4.77659,55.97977|-4.62723,55.94555|-4.52305,55.91861|-4.70972,55.93403|-4.75166,55.94611|-4.82406,55.94950|-4.87826,55.93653|-4.91639,55.70083|-4.87584,55.68194|-4.81361,55.64555|-4.68722,55.59750|-4.61361,55.49069|-4.63958,55.44264|-4.68250,55.43388|-4.74847,55.41055|-4.83715,55.31882|-4.84778,55.26944|-4.86542,55.22340|-4.93500,55.17860|-5.01250,55.13347|-5.05361,55.04902|-5.17834,54.98888|-5.18563,54.93622|-5.17000,54.89111|-5.11666,54.83180|-5.00500,54.76333|-4.96229,54.68125|-4.92250,54.64055|-4.85723,54.62958|-4.96076,54.79687|-4.92431,54.83708|-4.85222,54.86861|-4.80125,54.85556|-4.74055,54.82166|-4.68084,54.79972|-4.59861,54.78027|-4.55792,54.73903|-4.49639,54.69888|-4.37584,54.67666|-4.34569,54.70916|-4.35973,54.77111|-4.41111,54.82583|-4.42445,54.88152|-4.38479,54.90555|-4.35056,54.85903|-4.09555,54.76777|-3.95361,54.76749|-3.86972,54.80527|-3.81222,54.84888|-3.69250,54.88110|-3.61584,54.87527|-3.57111,54.99083|-3.44528,54.98638|-3.36056,54.97138|-3.14695,54.96500|-3.05103,54.97986|-3.01500,55.05222|-2.96278,55.03889|-2.69945,55.17722|-2.63055,55.25500|-2.46305,55.36111|-2.21236,55.42777|-2.18278,55.45985|-2.21528,55.50583|-2.27416,55.57527|-2.27916,55.64472|-2.22000,55.66499|-2.08361,55.78054|-2.02166,55.80611'; |
|
3063 | - break; |
|
3064 | - case 'IRELAND': |
|
3065 | - $coordsAsStr[] = '-8.17166,54.46388|-8.06555,54.37277|-7.94139,54.29944|-7.87576,54.28499|-7.86834,54.22764|-7.81805,54.19916|-7.69972,54.20250|-7.55945,54.12694|-7.31334,54.11250|-7.14584,54.22527|-7.17555,54.28916|-7.16084,54.33666|-7.05834,54.41000|-6.97445,54.40166|-6.92695,54.37916|-6.87305,54.34208|-6.85111,54.28972|-6.73473,54.18361|-6.65556,54.06527|-6.60584,54.04444|-6.44750,54.05833|-6.33889,54.11555|-6.26697,54.09983|-6.17403,54.07222|-6.10834,54.03638|-6.04389,54.03139|-5.96834,54.06389|-5.88500,54.11639|-5.87347,54.20916|-5.82500,54.23958|-5.74611,54.24806|-5.65556,54.22701|-5.60834,54.24972|-5.55916,54.29084|-5.57334,54.37704|-5.64502,54.49267|-5.70472,54.53361|-5.68055,54.57306|-5.59972,54.54194|-5.55097,54.50083|-5.54216,54.44903|-5.54643,54.40527|-5.50672,54.36444|-5.46111,54.38555|-5.43132,54.48596|-5.47945,54.53638|-5.53521,54.65090|-5.57431,54.67722|-5.62916,54.67945|-5.73674,54.67383|-5.80305,54.66138|-5.88257,54.60652|-5.92445,54.63180|-5.86681,54.68972|-5.81903,54.70972|-5.74672,54.72452|-5.68775,54.76335|-5.70931,54.83166|-5.74694,54.85361|-5.79139,54.85139|-6.03611,55.05778|-6.04250,55.10277|-6.03444,55.15458|-6.10125,55.20945|-6.14584,55.22069|-6.25500,55.21194|-6.37639,55.23916|-6.51556,55.23305|-6.61334,55.20722|-6.73028,55.18027|-6.82472,55.16806|-6.88972,55.16777|-6.96695,55.15611|-6.99416,55.11027|-7.05139,55.04680|-7.09500,55.03694|-7.25251,55.07059|-7.32639,55.04527|-7.40639,54.95333|-7.45805,54.85777|-7.55334,54.76277|-7.73916,54.71054|-7.82576,54.73416|-7.92639,54.70054|-7.85236,54.63388|-7.77750,54.62694|-7.83361,54.55389|-7.95084,54.53222|-8.04695,54.50722|-8.17166,54.46388'; |
|
3066 | - break; |
|
3067 | - case 'WALES': |
|
3068 | - $coordsAsStr[] = '-3.08860,53.26001|-3.33639,53.34722|-3.38806,53.34361|-3.60986,53.27944|-3.73014,53.28944|-3.85445,53.28444|-4.01861,53.23750|-4.06639,53.22639|-4.15334,53.22556|-4.19639,53.20611|-4.33028,53.11222|-4.36097,53.02888|-4.55278,52.92889|-4.61889,52.90916|-4.72195,52.83611|-4.72778,52.78139|-4.53945,52.79306|-4.47722,52.85500|-4.41416,52.88472|-4.31292,52.90499|-4.23334,52.91499|-4.13569,52.87888|-4.13056,52.77777|-4.05334,52.71666|-4.10639,52.65084|-4.12597,52.60375|-4.08056,52.55333|-4.05972,52.48584|-4.09666,52.38583|-4.14305,52.32027|-4.19361,52.27638|-4.23166,52.24888|-4.52722,52.13083|-4.66945,52.13027|-4.73695,52.10361|-4.76778,52.06444|-4.84445,52.01388|-5.09945,51.96056|-5.23916,51.91638|-5.25889,51.87056|-5.18500,51.86958|-5.11528,51.83333|-5.10257,51.77895|-5.16111,51.76222|-5.24694,51.73027|-5.19111,51.70888|-5.00739,51.70349|-4.90875,51.71249|-4.86111,51.71334|-4.97061,51.67577|-5.02128,51.66861|-5.05139,51.62028|-5.00528,51.60638|-4.94139,51.59416|-4.89028,51.62694|-4.83569,51.64534|-4.79063,51.63340|-4.69028,51.66666|-4.64584,51.72666|-4.57445,51.73416|-4.43611,51.73722|-4.26222,51.67694|-4.19750,51.67916|-4.06614,51.66804|-4.11639,51.63416|-4.17750,51.62235|-4.25055,51.62861|-4.29208,51.60743|-4.27778,51.55666|-4.20486,51.53527|-3.94972,51.61278|-3.83792,51.61999|-3.78166,51.56750|-3.75160,51.52931|-3.67194,51.47388|-3.54250,51.39777|-3.40334,51.37972|-3.27097,51.38014|-3.16458,51.40909|-3.15166,51.45305|-3.11875,51.48750|-3.02111,51.52527|-2.95472,51.53972|-2.89278,51.53861|-2.84778,51.54500|-2.71472,51.58083|-2.66500,51.61500|-2.68666,51.71889|-2.68334,51.76957|-2.65944,51.81806|-2.77861,51.88583|-2.86639,51.92889|-2.91757,51.91569|-2.98889,51.92555|-3.04528,51.97639|-3.08500,52.01930|-3.11250,52.06945|-3.12222,52.11805|-3.07555,52.14804|-3.05125,52.23347|-2.99750,52.28139|-2.95486,52.33117|-3.02195,52.34027|-3.19611,52.41027|-3.19514,52.46722|-3.11916,52.49194|-3.02736,52.49792|-2.98028,52.53083|-3.00792,52.56902|-3.07089,52.55702|-3.11750,52.58666|-3.06666,52.63527|-3.01111,52.71166|-3.06806,52.77027|-3.13708,52.79312|-3.13014,52.88486|-3.08639,52.91611|-2.99389,52.95361|-2.85069,52.93875|-2.79278,52.90207|-2.71945,52.91902|-2.73109,52.96873|-2.77792,52.98514|-2.85695,53.03249|-2.89389,53.10416|-2.91069,53.17014|-2.95528,53.21555|-3.02000,53.24722|-3.08860,53.26001'; |
|
3069 | - break; |
|
3070 | - case 'NC': |
|
3071 | - $coordsAsStr[] = '-81.65876,36.60938|-81.70390,36.55513|-81.70639,36.50804|-81.74665,36.39777|-81.90723,36.30804|-82.03195,36.12694|-82.08416,36.10146|-82.12826,36.11020|-82.21500,36.15833|-82.36375,36.11347|-82.43472,36.06013|-82.46236,36.01708|-82.56006,35.96263|-82.60042,35.99638|-82.62308,36.06121|-82.73500,36.01833|-82.84612,35.94944|-82.90451,35.88819|-82.93555,35.83846|-83.16000,35.76236|-83.24222,35.71944|-83.49222,35.57111|-83.56847,35.55861|-83.64416,35.56471|-83.73499,35.56638|-83.88222,35.51791|-83.98361,35.44944|-84.03639,35.35444|-84.04964,35.29117|-84.09042,35.25986|-84.15084,35.25388|-84.20521,35.25722|-84.29284,35.22596|-84.32471,34.98701|-83.09778,35.00027|-82.77722,35.09138|-82.59639,35.14972|-82.37999,35.21500|-82.27362,35.20583|-81.41306,35.17416|-81.05915,35.15333|-80.92666,35.10695|-80.78751,34.95610|-80.79334,34.82555|-79.66777,34.80694|-79.11555,34.34527|-78.57222,33.88166|-78.51806,33.87999|-78.43721,33.89804|-78.23735,33.91986|-78.15389,33.91471|-78.06974,33.89500|-78.02597,33.88936|-77.97611,33.94276|-77.95299,33.99243|-77.94499,34.06499|-77.92728,34.11756|-77.92250,33.99194|-77.92264,33.93715|-77.88215,34.06166|-77.86222,34.15083|-77.83501,34.19194|-77.75724,34.28527|-77.68222,34.36555|-77.63667,34.39805|-77.57363,34.43694|-77.45527,34.50403|-77.38173,34.51646|-77.37905,34.56294|-77.38572,34.61260|-77.40944,34.68916|-77.38847,34.73304|-77.33097,34.63992|-77.35024,34.60099|-77.30958,34.55972|-77.09424,34.67742|-76.75994,34.76659|-76.68325,34.79749|-76.66097,34.75781|-76.62611,34.71014|-76.50063,34.73617|-76.48138,34.77638|-76.38305,34.86423|-76.34326,34.88194|-76.27181,34.96263|-76.35125,35.02221|-76.32354,34.97429|-76.45319,34.93524|-76.43395,34.98782|-76.45356,35.06676|-76.52917,35.00444|-76.63382,34.98242|-76.69722,34.94887|-76.75306,34.90526|-76.81636,34.93944|-76.89000,34.95388|-76.93180,34.96957|-76.96501,34.99777|-77.06816,35.14978|-76.97639,35.06806|-76.86722,35.00000|-76.80531,34.98559|-76.72708,35.00152|-76.60402,35.07416|-76.56555,35.11486|-76.57305,35.16013|-76.66489,35.16694|-76.56361,35.23361|-76.48750,35.22582|-76.46889,35.27166|-76.50298,35.30791|-76.83251,35.39222|-77.02305,35.48694|-77.04958,35.52694|-76.91292,35.46166|-76.65250,35.41499|-76.61611,35.45888|-76.63195,35.52249|-76.58820,35.55104|-76.51556,35.53194|-76.56711,35.48494|-76.52251,35.40416|-76.46195,35.37221|-76.13319,35.35986|-76.04111,35.42416|-76.00223,35.46610|-75.97958,35.51666|-75.89362,35.57555|-75.83834,35.56694|-75.78944,35.57138|-75.74076,35.61846|-75.72084,35.69263|-75.72084,35.81451|-75.74917,35.87791|-75.78333,35.91972|-75.85083,35.97527|-75.94333,35.91777|-75.98944,35.88054|-75.98854,35.79110|-75.99388,35.71027|-76.02875,35.65409|-76.10320,35.66041|-76.13563,35.69239|-76.04475,35.68436|-76.04167,35.74916|-76.05305,35.79361|-76.05305,35.87375|-76.02653,35.96222|-76.07751,35.99319|-76.17472,35.99596|-76.27917,35.91915|-76.37986,35.95763|-76.42014,35.97874|-76.55375,35.93971|-76.66222,35.93305|-76.72952,35.93984|-76.73392,36.04760|-76.75384,36.09477|-76.76028,36.14513|-76.74610,36.22818|-76.70458,36.24673|-76.72764,36.16736|-76.71021,36.11752|-76.69117,36.07165|-76.65979,36.03312|-76.49527,36.00958|-76.37138,36.07694|-76.37084,36.14999|-76.21417,36.09471|-76.07591,36.17910|-76.18361,36.26915|-76.19965,36.31739|-76.13986,36.28805|-76.04274,36.21974|-76.00465,36.18110|-75.95287,36.19241|-75.97604,36.31138|-75.93895,36.28381|-75.85271,36.11069|-75.79315,36.07385|-75.79639,36.11804|-75.88333,36.29554|-75.94665,36.37194|-75.98694,36.41166|-76.03473,36.49666|-76.02899,36.55000|-78.44234,36.54986|-78.56594,36.55799|-80.27556,36.55110|-81.15361,36.56499|-81.38722,36.57695|-81.65876,36.60938'; |
|
3072 | - break; |
|
3073 | - default: |
|
3058 | + case 'ENGLAND': |
|
3059 | + $coordsAsStr[] = '-4.74361,50.66750|-4.78361,50.59361|-4.91584,50.57722|-5.01750,50.54264|-5.02569,50.47271|-5.04729,50.42750|-5.15208,50.34374|-5.26805,50.27389|-5.43194,50.19326|-5.49584,50.21695|-5.54639,50.20527|-5.71000,50.12916|-5.71681,50.06083|-5.66174,50.03631|-5.58278,50.04777|-5.54166,50.07055|-5.53416,50.11569|-5.47055,50.12499|-5.33361,50.09138|-5.27666,50.05972|-5.25674,50.00514|-5.19306,49.95527|-5.16070,50.00319|-5.06555,50.03750|-5.07090,50.08166|-5.04806,50.17111|-4.95278,50.19333|-4.85750,50.23166|-4.76250,50.31138|-4.67861,50.32583|-4.54334,50.32222|-4.48278,50.32583|-4.42972,50.35139|-4.38000,50.36388|-4.16555,50.37028|-4.11139,50.33027|-4.05708,50.29791|-3.94389,50.31346|-3.87764,50.28139|-3.83653,50.22972|-3.78944,50.21222|-3.70666,50.20972|-3.65195,50.23111|-3.55139,50.43833|-3.49416,50.54639|-3.46181,50.58792|-3.41139,50.61610|-3.24416,50.67444|-3.17347,50.68833|-3.09445,50.69222|-2.97806,50.70638|-2.92750,50.73125|-2.88278,50.73111|-2.82305,50.72027|-2.77139,50.70861|-2.66195,50.67334|-2.56305,50.63222|-2.45861,50.57500|-2.44666,50.62639|-2.39097,50.64166|-2.19722,50.62611|-2.12195,50.60722|-2.05445,50.58569|-1.96437,50.59674|-1.95441,50.66536|-2.06681,50.71430|-1.93416,50.71277|-1.81639,50.72306|-1.68445,50.73888|-1.59278,50.72416|-1.33139,50.79138|-1.11695,50.80694|-1.15889,50.84083|-1.09445,50.84584|-0.92842,50.83966|-0.86584,50.79965|-0.90826,50.77396|-0.78187,50.72722|-0.74611,50.76583|-0.67528,50.78111|-0.57722,50.79527|-0.25500,50.82638|-0.19084,50.82583|-0.13805,50.81833|0.05695,50.78083|0.12334,50.75944|0.22778,50.73944|0.28695,50.76500|0.37195,50.81638|0.43084,50.83111|0.56722,50.84777|0.67889,50.87681|0.71639,50.90500|0.79334,50.93610|0.85666,50.92556|0.97125,50.98111|0.99778,51.01903|1.04555,51.04944|1.10028,51.07361|1.26250,51.10166|1.36889,51.13583|1.41111,51.20111|1.42750,51.33111|1.38556,51.38777|1.19195,51.37861|1.05278,51.36722|0.99916,51.34777|0.90806,51.34069|0.70416,51.37749|0.61972,51.38304|0.55945,51.40596|0.64236,51.44042|0.69750,51.47084|0.59195,51.48777|0.53611,51.48806|0.48916,51.48445|0.45215,51.45562|0.38894,51.44822|0.46500,51.50306|0.65195,51.53680|0.76695,51.52138|0.82084,51.53556|0.87528,51.56110|0.95250,51.60923|0.94695,51.72556|0.90257,51.73465|0.86306,51.71166|0.76140,51.69164|0.70111,51.71847|0.86211,51.77361|0.93236,51.80583|0.98278,51.82527|1.03569,51.77416|1.08834,51.77056|1.13222,51.77694|1.18139,51.78972|1.22361,51.80888|1.26611,51.83916|1.28097,51.88096|1.20834,51.95083|1.16347,52.02361|1.27750,51.98555|1.33125,51.92875|1.39028,51.96999|1.58736,52.08388|1.63000,52.19527|1.68576,52.32630|1.73028,52.41138|1.74945,52.45583|1.74590,52.62021|1.70250,52.71583|1.64528,52.77111|1.50361,52.83749|1.43222,52.87472|1.35250,52.90972|1.28222,52.92750|1.18389,52.93889|0.99472,52.95111|0.94222,52.95083|0.88472,52.96638|0.66722,52.97611|0.54778,52.96618|0.49139,52.93430|0.44431,52.86569|0.42903,52.82403|0.36334,52.78027|0.21778,52.80694|0.16125,52.86250|0.05778,52.88916|0.00211,52.87985|0.03222,52.91722|0.20389,53.02805|0.27666,53.06694|0.33916,53.09236|0.35389,53.18722|0.33958,53.23472|0.23555,53.39944|0.14347,53.47527|0.08528,53.48638|0.02694,53.50972|-0.10084,53.57306|-0.20722,53.63083|-0.26445,53.69083|-0.30166,53.71319|-0.39022,53.70794|-0.51972,53.68527|-0.71653,53.69638|-0.65445,53.72527|-0.60584,53.72972|-0.54916,53.70611|-0.42261,53.71755|-0.35728,53.73056|-0.29389,53.73666|-0.23139,53.72166|-0.10584,53.63166|-0.03472,53.62555|0.04416,53.63916|0.08916,53.62666|0.14945,53.58847|0.12639,53.64527|0.06264,53.70389|-0.12750,53.86388|-0.16916,53.91847|-0.21222,54.00833|-0.20569,54.05153|-0.16111,54.08806|-0.11694,54.13222|-0.20053,54.15171|-0.26250,54.17444|-0.39334,54.27277|-0.42166,54.33222|-0.45750,54.37694|-0.51847,54.44749|-0.56472,54.48000|-0.87584,54.57027|-1.06139,54.61722|-1.16528,54.64972|-1.30445,54.77138|-1.34556,54.87138|-1.41278,54.99944|-1.48292,55.08625|-1.51500,55.14972|-1.56584,55.28722|-1.58097,55.48361|-1.63597,55.58194|-1.69000,55.60556|-1.74695,55.62499|-1.81764,55.63306|-1.97681,55.75416|-2.02166,55.80611|-2.08361,55.78054|-2.22000,55.66499|-2.27916,55.64472|-2.27416,55.57527|-2.21528,55.50583|-2.18278,55.45985|-2.21236,55.42777|-2.46305,55.36111|-2.63055,55.25500|-2.69945,55.17722|-2.96278,55.03889|-3.01500,55.05222|-3.05103,54.97986|-3.13292,54.93139|-3.20861,54.94944|-3.28931,54.93792|-3.39166,54.87639|-3.42916,54.81555|-3.56916,54.64249|-3.61306,54.48861|-3.49305,54.40333|-3.43389,54.34806|-3.41056,54.28014|-3.38055,54.24444|-3.21472,54.09555|-3.15222,54.08194|-2.93097,54.15333|-2.81361,54.22277|-2.81750,54.14277|-2.83361,54.08500|-2.93250,53.95055|-3.05264,53.90764|-3.03708,53.74944|-2.99278,53.73277|-2.89979,53.72499|-2.97729,53.69382|-3.07306,53.59805|-3.10563,53.55993|-3.00678,53.41738|-2.95389,53.36027|-2.85736,53.32083|-2.70493,53.35062|-2.77639,53.29250|-2.89972,53.28916|-2.94250,53.31056|-3.02889,53.38191|-3.07248,53.40936|-3.16695,53.35708|-3.12611,53.32500|-3.08860,53.26001|-3.02000,53.24722|-2.95528,53.21555|-2.91069,53.17014|-2.89389,53.10416|-2.85695,53.03249|-2.77792,52.98514|-2.73109,52.96873|-2.71945,52.91902|-2.79278,52.90207|-2.85069,52.93875|-2.99389,52.95361|-3.08639,52.91611|-3.13014,52.88486|-3.13708,52.79312|-3.06806,52.77027|-3.01111,52.71166|-3.06666,52.63527|-3.11750,52.58666|-3.07089,52.55702|-3.00792,52.56902|-2.98028,52.53083|-3.02736,52.49792|-3.11916,52.49194|-3.19514,52.46722|-3.19611,52.41027|-3.02195,52.34027|-2.95486,52.33117|-2.99750,52.28139|-3.05125,52.23347|-3.07555,52.14804|-3.12222,52.11805|-3.11250,52.06945|-3.08500,52.01930|-3.04528,51.97639|-2.98889,51.92555|-2.91757,51.91569|-2.86639,51.92889|-2.77861,51.88583|-2.65944,51.81806|-2.68334,51.76957|-2.68666,51.71889|-2.66500,51.61500|-2.62916,51.64416|-2.57889,51.67777|-2.46056,51.74666|-2.40389,51.74041|-2.47166,51.72445|-2.55305,51.65722|-2.65334,51.56389|-2.77055,51.48916|-2.85278,51.44472|-2.96000,51.37499|-3.00695,51.30722|-3.01278,51.25632|-3.02834,51.20611|-3.30139,51.18111|-3.39361,51.18138|-3.43729,51.20638|-3.50722,51.22333|-3.57014,51.23027|-3.63222,51.21805|-3.70028,51.23000|-3.79250,51.23916|-3.88389,51.22416|-3.98472,51.21695|-4.11666,51.21222|-4.22805,51.18777|-4.22028,51.11054|-4.23702,51.04659|-4.30361,51.00416|-4.37639,50.99110|-4.42736,51.00958|-4.47445,51.01416|-4.52132,51.01424|-4.54334,50.92694|-4.56139,50.77625|-4.65139,50.71527|-4.74361,50.66750'; |
|
3060 | + break; |
|
3061 | + case 'SCOTLAND': |
|
3062 | + $coordsAsStr[] = '-2.02166,55.80611|-2.07972,55.86722|-2.13028,55.88583|-2.26028,55.91861|-2.37528,55.95694|-2.65722,56.05972|-2.82028,56.05694|-2.86618,56.02840|-2.89555,55.98861|-2.93500,55.96944|-3.01805,55.94944|-3.06750,55.94444|-3.25472,55.97166|-3.45472,55.99194|-3.66416,56.00652|-3.73722,56.05555|-3.57139,56.05360|-3.44111,56.01916|-3.39584,56.01083|-3.34403,56.02333|-3.13903,56.11084|-2.97611,56.19472|-2.91666,56.20499|-2.84695,56.18638|-2.78805,56.18749|-2.67937,56.21465|-2.58403,56.28264|-2.67208,56.32277|-2.76861,56.33180|-2.81528,56.37360|-2.81208,56.43958|-2.91653,56.45014|-2.99555,56.41416|-3.19042,56.35958|-3.27805,56.35750|-3.04055,56.45472|-2.95861,56.45611|-2.72084,56.48888|-2.64084,56.52250|-2.53126,56.57611|-2.48861,56.61416|-2.47805,56.71527|-2.39000,56.77166|-2.31986,56.79638|-2.21972,56.86777|-2.19708,56.94388|-2.16695,57.00055|-2.09334,57.07027|-2.05416,57.21861|-1.95889,57.33250|-1.85584,57.39889|-1.77334,57.45805|-1.78139,57.50555|-1.82195,57.57861|-1.86000,57.62138|-1.92972,57.67777|-2.02222,57.69388|-2.07555,57.69944|-2.14028,57.69056|-2.18611,57.66861|-2.39626,57.66638|-2.51000,57.67166|-2.78639,57.70222|-2.89806,57.70694|-2.96750,57.68027|-3.03847,57.66249|-3.12334,57.67166|-3.22334,57.69166|-3.28625,57.72499|-3.33972,57.72333|-3.48805,57.70945|-3.52222,57.66333|-3.59542,57.63666|-3.64063,57.63881|-3.75414,57.62504|-4.03986,57.55569|-4.19666,57.48584|-4.22889,57.51554|-4.17945,57.56249|-4.11139,57.59833|-4.08078,57.66533|-4.19139,57.67139|-4.25945,57.65527|-4.34361,57.60777|-4.41639,57.60166|-4.29666,57.67444|-4.08528,57.72611|-4.01908,57.70226|-3.96861,57.70250|-3.86556,57.76861|-3.81945,57.80458|-3.80681,57.85819|-3.85055,57.82000|-3.92639,57.80749|-4.04322,57.81438|-4.14973,57.82527|-4.29750,57.84638|-4.36250,57.89777|-4.24306,57.87028|-4.10666,57.85195|-4.01500,57.86777|-3.99166,57.90611|-3.99695,57.95056|-3.84500,58.02000|-3.56611,58.13916|-3.51319,58.16374|-3.45916,58.20305|-3.42028,58.24361|-3.33750,58.27694|-3.20555,58.30625|-3.10972,58.38166|-3.05792,58.45083|-3.02264,58.64653|-3.17639,58.64944|-3.35389,58.66055|-3.36931,58.59555|-3.57611,58.62194|-3.66028,58.61972|-3.71166,58.60374|-3.78264,58.56750|-3.84834,58.56000|-4.08056,58.55527|-4.27722,58.53361|-4.43653,58.54902|-4.50666,58.56777|-4.56055,58.57584|-4.59910,58.53027|-4.66805,58.48833|-4.76146,58.44604|-4.70195,58.50999|-4.70166,58.55861|-4.77014,58.60264|-5.00153,58.62416|-5.10945,58.50833|-5.16472,58.32527|-5.12639,58.28750|-5.07166,58.26472|-5.20361,58.25083|-5.39764,58.25055|-5.27389,58.11722|-5.31514,58.06416|-5.38416,58.08361|-5.45285,58.07416|-5.39805,58.03111|-5.26278,57.97111|-5.19334,57.95069|-5.12750,57.86944|-5.21750,57.90084|-5.33861,57.92083|-5.42876,57.90104|-5.45750,57.85889|-5.64445,57.89972|-5.62555,57.85222|-5.58153,57.81945|-5.60674,57.76618|-5.66305,57.78889|-5.71695,57.86944|-5.76695,57.86472|-5.81708,57.81944|-5.81084,57.63958|-5.69555,57.55944|-5.64361,57.55222|-5.53084,57.52833|-5.65305,57.50875|-5.75000,57.54834|-5.81569,57.57923|-5.85042,57.54972|-5.86695,57.46777|-5.81806,57.36250|-5.75111,57.34333|-5.50334,57.40111|-5.45126,57.41805|-5.49250,57.37083|-5.59884,57.33049|-5.57116,57.28411|-5.51266,57.27745|-5.40514,57.23097|-5.44972,57.22138|-5.49472,57.23888|-5.56066,57.25477|-5.64611,57.23499|-5.64751,57.16161|-5.55028,57.11639|-5.48166,57.11222|-5.40305,57.11062|-5.55945,57.09250|-5.65111,57.11611|-5.72472,57.11306|-5.77361,57.04556|-5.63139,56.98499|-5.56916,56.98972|-5.52403,56.99735|-5.57916,56.98000|-5.64611,56.97222|-5.73374,57.00909|-5.82584,57.00346|-5.91958,56.88708|-5.86528,56.87944|-5.74278,56.89374|-5.66292,56.86924|-5.73306,56.83916|-5.78584,56.83955|-5.85590,56.81430|-5.80208,56.79180|-5.84958,56.74444|-5.90500,56.75666|-5.96694,56.78027|-6.14000,56.75777|-6.19208,56.74888|-6.23452,56.71673|-6.19139,56.67972|-5.91916,56.67388|-5.82622,56.69156|-5.73945,56.71166|-5.55240,56.68886|-5.64861,56.68027|-5.69916,56.68278|-5.88261,56.65666|-5.97472,56.65138|-5.99584,56.61138|-5.93056,56.56972|-5.88416,56.55333|-5.79056,56.53805|-5.67695,56.49389|-5.56389,56.54056|-5.36334,56.66195|-5.23416,56.74333|-5.13236,56.79403|-5.31473,56.65666|-5.37405,56.55925|-5.31826,56.55633|-5.25080,56.55753|-5.37718,56.52112|-5.39866,56.47866|-5.19111,56.46194|-5.11556,56.51277|-5.07014,56.56069|-5.13555,56.48499|-5.22084,56.43583|-5.32764,56.43574|-5.42439,56.43091|-5.52611,56.37360|-5.57139,56.32833|-5.59653,56.25695|-5.57389,56.16000|-5.52000,56.16485|-5.56334,56.11333|-5.60139,56.07638|-5.64222,56.04305|-5.66039,55.98263|-5.62555,56.02055|-5.58014,56.01319|-5.63361,55.96611|-5.67697,55.88844|-5.64750,55.78139|-5.60986,55.75930|-5.66916,55.66166|-5.70166,55.58861|-5.71805,55.51500|-5.75916,55.41750|-5.79528,55.36027|-5.78166,55.29902|-5.73778,55.29222|-5.56694,55.31666|-5.51528,55.36347|-5.55520,55.41440|-5.48639,55.64306|-5.44597,55.70680|-5.38000,55.75027|-5.41889,55.90666|-5.39924,55.99972|-5.33895,56.03456|-5.30594,56.06922|-5.23889,56.11889|-5.03222,56.23250|-4.92229,56.27111|-4.97416,56.23333|-5.07222,56.18695|-5.20069,56.11861|-5.30906,56.00570|-5.34000,55.90201|-5.29250,55.84750|-5.20805,55.84444|-5.22458,55.90175|-5.17334,55.92916|-5.11000,55.90306|-5.01222,55.86694|-4.96195,55.88000|-4.89824,55.98145|-4.84623,56.08632|-4.86636,56.03178|-4.85461,55.98648|-4.77659,55.97977|-4.62723,55.94555|-4.52305,55.91861|-4.70972,55.93403|-4.75166,55.94611|-4.82406,55.94950|-4.87826,55.93653|-4.91639,55.70083|-4.87584,55.68194|-4.81361,55.64555|-4.68722,55.59750|-4.61361,55.49069|-4.63958,55.44264|-4.68250,55.43388|-4.74847,55.41055|-4.83715,55.31882|-4.84778,55.26944|-4.86542,55.22340|-4.93500,55.17860|-5.01250,55.13347|-5.05361,55.04902|-5.17834,54.98888|-5.18563,54.93622|-5.17000,54.89111|-5.11666,54.83180|-5.00500,54.76333|-4.96229,54.68125|-4.92250,54.64055|-4.85723,54.62958|-4.96076,54.79687|-4.92431,54.83708|-4.85222,54.86861|-4.80125,54.85556|-4.74055,54.82166|-4.68084,54.79972|-4.59861,54.78027|-4.55792,54.73903|-4.49639,54.69888|-4.37584,54.67666|-4.34569,54.70916|-4.35973,54.77111|-4.41111,54.82583|-4.42445,54.88152|-4.38479,54.90555|-4.35056,54.85903|-4.09555,54.76777|-3.95361,54.76749|-3.86972,54.80527|-3.81222,54.84888|-3.69250,54.88110|-3.61584,54.87527|-3.57111,54.99083|-3.44528,54.98638|-3.36056,54.97138|-3.14695,54.96500|-3.05103,54.97986|-3.01500,55.05222|-2.96278,55.03889|-2.69945,55.17722|-2.63055,55.25500|-2.46305,55.36111|-2.21236,55.42777|-2.18278,55.45985|-2.21528,55.50583|-2.27416,55.57527|-2.27916,55.64472|-2.22000,55.66499|-2.08361,55.78054|-2.02166,55.80611'; |
|
3063 | + break; |
|
3064 | + case 'IRELAND': |
|
3065 | + $coordsAsStr[] = '-8.17166,54.46388|-8.06555,54.37277|-7.94139,54.29944|-7.87576,54.28499|-7.86834,54.22764|-7.81805,54.19916|-7.69972,54.20250|-7.55945,54.12694|-7.31334,54.11250|-7.14584,54.22527|-7.17555,54.28916|-7.16084,54.33666|-7.05834,54.41000|-6.97445,54.40166|-6.92695,54.37916|-6.87305,54.34208|-6.85111,54.28972|-6.73473,54.18361|-6.65556,54.06527|-6.60584,54.04444|-6.44750,54.05833|-6.33889,54.11555|-6.26697,54.09983|-6.17403,54.07222|-6.10834,54.03638|-6.04389,54.03139|-5.96834,54.06389|-5.88500,54.11639|-5.87347,54.20916|-5.82500,54.23958|-5.74611,54.24806|-5.65556,54.22701|-5.60834,54.24972|-5.55916,54.29084|-5.57334,54.37704|-5.64502,54.49267|-5.70472,54.53361|-5.68055,54.57306|-5.59972,54.54194|-5.55097,54.50083|-5.54216,54.44903|-5.54643,54.40527|-5.50672,54.36444|-5.46111,54.38555|-5.43132,54.48596|-5.47945,54.53638|-5.53521,54.65090|-5.57431,54.67722|-5.62916,54.67945|-5.73674,54.67383|-5.80305,54.66138|-5.88257,54.60652|-5.92445,54.63180|-5.86681,54.68972|-5.81903,54.70972|-5.74672,54.72452|-5.68775,54.76335|-5.70931,54.83166|-5.74694,54.85361|-5.79139,54.85139|-6.03611,55.05778|-6.04250,55.10277|-6.03444,55.15458|-6.10125,55.20945|-6.14584,55.22069|-6.25500,55.21194|-6.37639,55.23916|-6.51556,55.23305|-6.61334,55.20722|-6.73028,55.18027|-6.82472,55.16806|-6.88972,55.16777|-6.96695,55.15611|-6.99416,55.11027|-7.05139,55.04680|-7.09500,55.03694|-7.25251,55.07059|-7.32639,55.04527|-7.40639,54.95333|-7.45805,54.85777|-7.55334,54.76277|-7.73916,54.71054|-7.82576,54.73416|-7.92639,54.70054|-7.85236,54.63388|-7.77750,54.62694|-7.83361,54.55389|-7.95084,54.53222|-8.04695,54.50722|-8.17166,54.46388'; |
|
3066 | + break; |
|
3067 | + case 'WALES': |
|
3068 | + $coordsAsStr[] = '-3.08860,53.26001|-3.33639,53.34722|-3.38806,53.34361|-3.60986,53.27944|-3.73014,53.28944|-3.85445,53.28444|-4.01861,53.23750|-4.06639,53.22639|-4.15334,53.22556|-4.19639,53.20611|-4.33028,53.11222|-4.36097,53.02888|-4.55278,52.92889|-4.61889,52.90916|-4.72195,52.83611|-4.72778,52.78139|-4.53945,52.79306|-4.47722,52.85500|-4.41416,52.88472|-4.31292,52.90499|-4.23334,52.91499|-4.13569,52.87888|-4.13056,52.77777|-4.05334,52.71666|-4.10639,52.65084|-4.12597,52.60375|-4.08056,52.55333|-4.05972,52.48584|-4.09666,52.38583|-4.14305,52.32027|-4.19361,52.27638|-4.23166,52.24888|-4.52722,52.13083|-4.66945,52.13027|-4.73695,52.10361|-4.76778,52.06444|-4.84445,52.01388|-5.09945,51.96056|-5.23916,51.91638|-5.25889,51.87056|-5.18500,51.86958|-5.11528,51.83333|-5.10257,51.77895|-5.16111,51.76222|-5.24694,51.73027|-5.19111,51.70888|-5.00739,51.70349|-4.90875,51.71249|-4.86111,51.71334|-4.97061,51.67577|-5.02128,51.66861|-5.05139,51.62028|-5.00528,51.60638|-4.94139,51.59416|-4.89028,51.62694|-4.83569,51.64534|-4.79063,51.63340|-4.69028,51.66666|-4.64584,51.72666|-4.57445,51.73416|-4.43611,51.73722|-4.26222,51.67694|-4.19750,51.67916|-4.06614,51.66804|-4.11639,51.63416|-4.17750,51.62235|-4.25055,51.62861|-4.29208,51.60743|-4.27778,51.55666|-4.20486,51.53527|-3.94972,51.61278|-3.83792,51.61999|-3.78166,51.56750|-3.75160,51.52931|-3.67194,51.47388|-3.54250,51.39777|-3.40334,51.37972|-3.27097,51.38014|-3.16458,51.40909|-3.15166,51.45305|-3.11875,51.48750|-3.02111,51.52527|-2.95472,51.53972|-2.89278,51.53861|-2.84778,51.54500|-2.71472,51.58083|-2.66500,51.61500|-2.68666,51.71889|-2.68334,51.76957|-2.65944,51.81806|-2.77861,51.88583|-2.86639,51.92889|-2.91757,51.91569|-2.98889,51.92555|-3.04528,51.97639|-3.08500,52.01930|-3.11250,52.06945|-3.12222,52.11805|-3.07555,52.14804|-3.05125,52.23347|-2.99750,52.28139|-2.95486,52.33117|-3.02195,52.34027|-3.19611,52.41027|-3.19514,52.46722|-3.11916,52.49194|-3.02736,52.49792|-2.98028,52.53083|-3.00792,52.56902|-3.07089,52.55702|-3.11750,52.58666|-3.06666,52.63527|-3.01111,52.71166|-3.06806,52.77027|-3.13708,52.79312|-3.13014,52.88486|-3.08639,52.91611|-2.99389,52.95361|-2.85069,52.93875|-2.79278,52.90207|-2.71945,52.91902|-2.73109,52.96873|-2.77792,52.98514|-2.85695,53.03249|-2.89389,53.10416|-2.91069,53.17014|-2.95528,53.21555|-3.02000,53.24722|-3.08860,53.26001'; |
|
3069 | + break; |
|
3070 | + case 'NC': |
|
3071 | + $coordsAsStr[] = '-81.65876,36.60938|-81.70390,36.55513|-81.70639,36.50804|-81.74665,36.39777|-81.90723,36.30804|-82.03195,36.12694|-82.08416,36.10146|-82.12826,36.11020|-82.21500,36.15833|-82.36375,36.11347|-82.43472,36.06013|-82.46236,36.01708|-82.56006,35.96263|-82.60042,35.99638|-82.62308,36.06121|-82.73500,36.01833|-82.84612,35.94944|-82.90451,35.88819|-82.93555,35.83846|-83.16000,35.76236|-83.24222,35.71944|-83.49222,35.57111|-83.56847,35.55861|-83.64416,35.56471|-83.73499,35.56638|-83.88222,35.51791|-83.98361,35.44944|-84.03639,35.35444|-84.04964,35.29117|-84.09042,35.25986|-84.15084,35.25388|-84.20521,35.25722|-84.29284,35.22596|-84.32471,34.98701|-83.09778,35.00027|-82.77722,35.09138|-82.59639,35.14972|-82.37999,35.21500|-82.27362,35.20583|-81.41306,35.17416|-81.05915,35.15333|-80.92666,35.10695|-80.78751,34.95610|-80.79334,34.82555|-79.66777,34.80694|-79.11555,34.34527|-78.57222,33.88166|-78.51806,33.87999|-78.43721,33.89804|-78.23735,33.91986|-78.15389,33.91471|-78.06974,33.89500|-78.02597,33.88936|-77.97611,33.94276|-77.95299,33.99243|-77.94499,34.06499|-77.92728,34.11756|-77.92250,33.99194|-77.92264,33.93715|-77.88215,34.06166|-77.86222,34.15083|-77.83501,34.19194|-77.75724,34.28527|-77.68222,34.36555|-77.63667,34.39805|-77.57363,34.43694|-77.45527,34.50403|-77.38173,34.51646|-77.37905,34.56294|-77.38572,34.61260|-77.40944,34.68916|-77.38847,34.73304|-77.33097,34.63992|-77.35024,34.60099|-77.30958,34.55972|-77.09424,34.67742|-76.75994,34.76659|-76.68325,34.79749|-76.66097,34.75781|-76.62611,34.71014|-76.50063,34.73617|-76.48138,34.77638|-76.38305,34.86423|-76.34326,34.88194|-76.27181,34.96263|-76.35125,35.02221|-76.32354,34.97429|-76.45319,34.93524|-76.43395,34.98782|-76.45356,35.06676|-76.52917,35.00444|-76.63382,34.98242|-76.69722,34.94887|-76.75306,34.90526|-76.81636,34.93944|-76.89000,34.95388|-76.93180,34.96957|-76.96501,34.99777|-77.06816,35.14978|-76.97639,35.06806|-76.86722,35.00000|-76.80531,34.98559|-76.72708,35.00152|-76.60402,35.07416|-76.56555,35.11486|-76.57305,35.16013|-76.66489,35.16694|-76.56361,35.23361|-76.48750,35.22582|-76.46889,35.27166|-76.50298,35.30791|-76.83251,35.39222|-77.02305,35.48694|-77.04958,35.52694|-76.91292,35.46166|-76.65250,35.41499|-76.61611,35.45888|-76.63195,35.52249|-76.58820,35.55104|-76.51556,35.53194|-76.56711,35.48494|-76.52251,35.40416|-76.46195,35.37221|-76.13319,35.35986|-76.04111,35.42416|-76.00223,35.46610|-75.97958,35.51666|-75.89362,35.57555|-75.83834,35.56694|-75.78944,35.57138|-75.74076,35.61846|-75.72084,35.69263|-75.72084,35.81451|-75.74917,35.87791|-75.78333,35.91972|-75.85083,35.97527|-75.94333,35.91777|-75.98944,35.88054|-75.98854,35.79110|-75.99388,35.71027|-76.02875,35.65409|-76.10320,35.66041|-76.13563,35.69239|-76.04475,35.68436|-76.04167,35.74916|-76.05305,35.79361|-76.05305,35.87375|-76.02653,35.96222|-76.07751,35.99319|-76.17472,35.99596|-76.27917,35.91915|-76.37986,35.95763|-76.42014,35.97874|-76.55375,35.93971|-76.66222,35.93305|-76.72952,35.93984|-76.73392,36.04760|-76.75384,36.09477|-76.76028,36.14513|-76.74610,36.22818|-76.70458,36.24673|-76.72764,36.16736|-76.71021,36.11752|-76.69117,36.07165|-76.65979,36.03312|-76.49527,36.00958|-76.37138,36.07694|-76.37084,36.14999|-76.21417,36.09471|-76.07591,36.17910|-76.18361,36.26915|-76.19965,36.31739|-76.13986,36.28805|-76.04274,36.21974|-76.00465,36.18110|-75.95287,36.19241|-75.97604,36.31138|-75.93895,36.28381|-75.85271,36.11069|-75.79315,36.07385|-75.79639,36.11804|-75.88333,36.29554|-75.94665,36.37194|-75.98694,36.41166|-76.03473,36.49666|-76.02899,36.55000|-78.44234,36.54986|-78.56594,36.55799|-80.27556,36.55110|-81.15361,36.56499|-81.38722,36.57695|-81.65876,36.60938'; |
|
3072 | + break; |
|
3073 | + default: |
|
3074 | 3074 | } |
3075 | 3075 | ?> |
3076 | 3076 | var coordStr = <?php echo json_encode($coordsAsStr) ?>; |
@@ -190,18 +190,18 @@ discard block |
||
190 | 190 | } |
191 | 191 | |
192 | 192 | switch ($this->privatize_export) { |
193 | - case 'gedadmin': |
|
194 | - $access_level = Auth::PRIV_NONE; |
|
195 | - break; |
|
196 | - case 'user': |
|
197 | - $access_level = Auth::PRIV_USER; |
|
198 | - break; |
|
199 | - case 'visitor': |
|
200 | - $access_level = Auth::PRIV_PRIVATE; |
|
201 | - break; |
|
202 | - case 'none': |
|
203 | - $access_level = Auth::PRIV_HIDE; |
|
204 | - break; |
|
193 | + case 'gedadmin': |
|
194 | + $access_level = Auth::PRIV_NONE; |
|
195 | + break; |
|
196 | + case 'user': |
|
197 | + $access_level = Auth::PRIV_USER; |
|
198 | + break; |
|
199 | + case 'visitor': |
|
200 | + $access_level = Auth::PRIV_PRIVATE; |
|
201 | + break; |
|
202 | + case 'none': |
|
203 | + $access_level = Auth::PRIV_HIDE; |
|
204 | + break; |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | foreach (array_keys($this->cart[$WT_TREE->getTreeId()]) as $xref) { |
@@ -234,38 +234,38 @@ discard block |
||
234 | 234 | $record = utf8_decode($record); |
235 | 235 | } |
236 | 236 | switch ($object::RECORD_TYPE) { |
237 | - case 'INDI': |
|
238 | - $filetext .= $record . "\n"; |
|
239 | - $filetext .= "1 SOUR @WEBTREES@\n"; |
|
240 | - $filetext .= "2 PAGE " . WT_BASE_URL . $object->getRawUrl() . "\n"; |
|
241 | - break; |
|
242 | - case 'FAM': |
|
243 | - $filetext .= $record . "\n"; |
|
244 | - $filetext .= "1 SOUR @WEBTREES@\n"; |
|
245 | - $filetext .= "2 PAGE " . WT_BASE_URL . $object->getRawUrl() . "\n"; |
|
246 | - break; |
|
247 | - case 'SOUR': |
|
248 | - $filetext .= $record . "\n"; |
|
249 | - $filetext .= "1 NOTE " . WT_BASE_URL . $object->getRawUrl() . "\n"; |
|
250 | - break; |
|
251 | - default: |
|
252 | - // This autoloads the PclZip library, so we can use its constants. |
|
253 | - new PclZip(''); |
|
254 | - |
|
255 | - $ft = preg_match_all("/\n\d FILE (.+)/", $savedRecord, $match, PREG_SET_ORDER); |
|
256 | - $MEDIA_DIRECTORY = $WT_TREE->getPreference('MEDIA_DIRECTORY'); |
|
257 | - for ($k = 0; $k < $ft; $k++) { |
|
258 | - // Skip external files and non-existant files |
|
259 | - if (file_exists(WT_DATA_DIR . $MEDIA_DIRECTORY . $match[$k][1])) { |
|
260 | - $media[$mediacount] = array( |
|
261 | - \PCLZIP_ATT_FILE_NAME => WT_DATA_DIR . $MEDIA_DIRECTORY . $match[$k][1], |
|
262 | - \PCLZIP_ATT_FILE_NEW_FULL_NAME => $match[$k][1], |
|
263 | - ); |
|
264 | - $mediacount++; |
|
237 | + case 'INDI': |
|
238 | + $filetext .= $record . "\n"; |
|
239 | + $filetext .= "1 SOUR @WEBTREES@\n"; |
|
240 | + $filetext .= "2 PAGE " . WT_BASE_URL . $object->getRawUrl() . "\n"; |
|
241 | + break; |
|
242 | + case 'FAM': |
|
243 | + $filetext .= $record . "\n"; |
|
244 | + $filetext .= "1 SOUR @WEBTREES@\n"; |
|
245 | + $filetext .= "2 PAGE " . WT_BASE_URL . $object->getRawUrl() . "\n"; |
|
246 | + break; |
|
247 | + case 'SOUR': |
|
248 | + $filetext .= $record . "\n"; |
|
249 | + $filetext .= "1 NOTE " . WT_BASE_URL . $object->getRawUrl() . "\n"; |
|
250 | + break; |
|
251 | + default: |
|
252 | + // This autoloads the PclZip library, so we can use its constants. |
|
253 | + new PclZip(''); |
|
254 | + |
|
255 | + $ft = preg_match_all("/\n\d FILE (.+)/", $savedRecord, $match, PREG_SET_ORDER); |
|
256 | + $MEDIA_DIRECTORY = $WT_TREE->getPreference('MEDIA_DIRECTORY'); |
|
257 | + for ($k = 0; $k < $ft; $k++) { |
|
258 | + // Skip external files and non-existant files |
|
259 | + if (file_exists(WT_DATA_DIR . $MEDIA_DIRECTORY . $match[$k][1])) { |
|
260 | + $media[$mediacount] = array( |
|
261 | + \PCLZIP_ATT_FILE_NAME => WT_DATA_DIR . $MEDIA_DIRECTORY . $match[$k][1], |
|
262 | + \PCLZIP_ATT_FILE_NEW_FULL_NAME => $match[$k][1], |
|
263 | + ); |
|
264 | + $mediacount++; |
|
265 | + } |
|
265 | 266 | } |
266 | - } |
|
267 | - $filetext .= trim($record) . "\n"; |
|
268 | - break; |
|
267 | + $filetext .= trim($record) . "\n"; |
|
268 | + break; |
|
269 | 269 | } |
270 | 270 | } |
271 | 271 | } |
@@ -452,22 +452,22 @@ discard block |
||
452 | 452 | $b = GedcomRecord::getInstance($b, $WT_TREE); |
453 | 453 | if ($a && $b) { |
454 | 454 | switch ($a::RECORD_TYPE) { |
455 | - case 'INDI': $t1 = 1; break; |
|
456 | - case 'FAM': $t1 = 2; break; |
|
457 | - case 'SOUR': $t1 = 3; break; |
|
458 | - case 'REPO': $t1 = 4; break; |
|
459 | - case 'OBJE': $t1 = 5; break; |
|
460 | - case 'NOTE': $t1 = 6; break; |
|
461 | - default: $t1 = 7; break; |
|
455 | + case 'INDI': $t1 = 1; break; |
|
456 | + case 'FAM': $t1 = 2; break; |
|
457 | + case 'SOUR': $t1 = 3; break; |
|
458 | + case 'REPO': $t1 = 4; break; |
|
459 | + case 'OBJE': $t1 = 5; break; |
|
460 | + case 'NOTE': $t1 = 6; break; |
|
461 | + default: $t1 = 7; break; |
|
462 | 462 | } |
463 | 463 | switch ($b::RECORD_TYPE) { |
464 | - case 'INDI': $t2 = 1; break; |
|
465 | - case 'FAM': $t2 = 2; break; |
|
466 | - case 'SOUR': $t2 = 3; break; |
|
467 | - case 'REPO': $t2 = 4; break; |
|
468 | - case 'OBJE': $t2 = 5; break; |
|
469 | - case 'NOTE': $t2 = 6; break; |
|
470 | - default: $t2 = 7; break; |
|
464 | + case 'INDI': $t2 = 1; break; |
|
465 | + case 'FAM': $t2 = 2; break; |
|
466 | + case 'SOUR': $t2 = 3; break; |
|
467 | + case 'REPO': $t2 = 4; break; |
|
468 | + case 'OBJE': $t2 = 5; break; |
|
469 | + case 'NOTE': $t2 = 6; break; |
|
470 | + default: $t2 = 7; break; |
|
471 | 471 | } |
472 | 472 | if ($t1 != $t2) { |
473 | 473 | return $t1 - $t2; |
@@ -47,41 +47,41 @@ |
||
47 | 47 | */ |
48 | 48 | public function modAction($mod_action) { |
49 | 49 | switch ($mod_action) { |
50 | - case 'admin_config': |
|
51 | - $this->config(); |
|
52 | - break; |
|
53 | - case 'admin_delete': |
|
54 | - if (Auth::isAdmin()) { |
|
55 | - $this->delete(); |
|
56 | - } |
|
57 | - header('Location: ' . WT_BASE_URL . 'module.php?mod=faq&mod_action=admin_config'); |
|
58 | - break; |
|
59 | - case 'admin_edit': |
|
60 | - $this->edit(); |
|
61 | - break; |
|
62 | - case 'admin_edit_save': |
|
63 | - if (Auth::isAdmin()) { |
|
64 | - $this->editSave(); |
|
65 | - } |
|
66 | - header('Location: ' . WT_BASE_URL . 'module.php?mod=faq&mod_action=admin_config'); |
|
67 | - break; |
|
68 | - case 'admin_movedown': |
|
69 | - if (Auth::isAdmin()) { |
|
70 | - $this->movedown(); |
|
71 | - } |
|
72 | - header('Location: ' . WT_BASE_URL . 'module.php?mod=faq&mod_action=admin_config'); |
|
73 | - break; |
|
74 | - case 'admin_moveup': |
|
75 | - if (Auth::isAdmin()) { |
|
76 | - $this->moveup(); |
|
77 | - } |
|
78 | - header('Location: ' . WT_BASE_URL . 'module.php?mod=faq&mod_action=admin_config'); |
|
79 | - break; |
|
80 | - case 'show': |
|
81 | - $this->show(); |
|
82 | - break; |
|
83 | - default: |
|
84 | - http_response_code(404); |
|
50 | + case 'admin_config': |
|
51 | + $this->config(); |
|
52 | + break; |
|
53 | + case 'admin_delete': |
|
54 | + if (Auth::isAdmin()) { |
|
55 | + $this->delete(); |
|
56 | + } |
|
57 | + header('Location: ' . WT_BASE_URL . 'module.php?mod=faq&mod_action=admin_config'); |
|
58 | + break; |
|
59 | + case 'admin_edit': |
|
60 | + $this->edit(); |
|
61 | + break; |
|
62 | + case 'admin_edit_save': |
|
63 | + if (Auth::isAdmin()) { |
|
64 | + $this->editSave(); |
|
65 | + } |
|
66 | + header('Location: ' . WT_BASE_URL . 'module.php?mod=faq&mod_action=admin_config'); |
|
67 | + break; |
|
68 | + case 'admin_movedown': |
|
69 | + if (Auth::isAdmin()) { |
|
70 | + $this->movedown(); |
|
71 | + } |
|
72 | + header('Location: ' . WT_BASE_URL . 'module.php?mod=faq&mod_action=admin_config'); |
|
73 | + break; |
|
74 | + case 'admin_moveup': |
|
75 | + if (Auth::isAdmin()) { |
|
76 | + $this->moveup(); |
|
77 | + } |
|
78 | + header('Location: ' . WT_BASE_URL . 'module.php?mod=faq&mod_action=admin_config'); |
|
79 | + break; |
|
80 | + case 'show': |
|
81 | + $this->show(); |
|
82 | + break; |
|
83 | + default: |
|
84 | + http_response_code(404); |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 |
@@ -119,24 +119,24 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | switch ($infoStyle) { |
122 | - case 'list': |
|
123 | - foreach ($yahrzeits as $yahrzeit) { |
|
124 | - if ($yahrzeit->jd >= $startjd && $yahrzeit->jd < $startjd + $days) { |
|
125 | - $ind = $yahrzeit->getParent(); |
|
126 | - $content .= "<a href=\"" . $ind->getHtmlUrl() . "\" class=\"list_item name2\">" . $ind->getFullName() . "</a>" . $ind->getSexImage(); |
|
127 | - $content .= "<div class=\"indent\">"; |
|
128 | - $content .= $yahrzeit->getDate()->display(true); |
|
129 | - $content .= ', ' . I18N::translate('%s year anniversary', $yahrzeit->anniv); |
|
130 | - $content .= "</div>"; |
|
122 | + case 'list': |
|
123 | + foreach ($yahrzeits as $yahrzeit) { |
|
124 | + if ($yahrzeit->jd >= $startjd && $yahrzeit->jd < $startjd + $days) { |
|
125 | + $ind = $yahrzeit->getParent(); |
|
126 | + $content .= "<a href=\"" . $ind->getHtmlUrl() . "\" class=\"list_item name2\">" . $ind->getFullName() . "</a>" . $ind->getSexImage(); |
|
127 | + $content .= "<div class=\"indent\">"; |
|
128 | + $content .= $yahrzeit->getDate()->display(true); |
|
129 | + $content .= ', ' . I18N::translate('%s year anniversary', $yahrzeit->anniv); |
|
130 | + $content .= "</div>"; |
|
131 | + } |
|
131 | 132 | } |
132 | - } |
|
133 | - break; |
|
134 | - case 'table': |
|
135 | - default: |
|
136 | - $table_id = Uuid::uuid4(); // table requires a unique ID |
|
137 | - $controller |
|
138 | - ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL) |
|
139 | - ->addInlineJavascript(' |
|
133 | + break; |
|
134 | + case 'table': |
|
135 | + default: |
|
136 | + $table_id = Uuid::uuid4(); // table requires a unique ID |
|
137 | + $controller |
|
138 | + ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL) |
|
139 | + ->addInlineJavascript(' |
|
140 | 140 | jQuery("#' . $table_id . '").dataTable({ |
141 | 141 | dom: \'t\', |
142 | 142 | ' . I18N::datatablesI18N() . ', |
@@ -160,53 +160,53 @@ discard block |
||
160 | 160 | jQuery("#' . $table_id . '").css("visibility", "visible"); |
161 | 161 | jQuery(".loading-image").css("display", "none"); |
162 | 162 | '); |
163 | - $content = ''; |
|
164 | - $content .= '<div class="loading-image"> </div>'; |
|
165 | - $content .= '<table id="' . $table_id . '" class="width100" style="visibility:hidden;">'; |
|
166 | - $content .= '<thead><tr>'; |
|
167 | - $content .= '<th>' . GedcomTag::getLabel('NAME') . '</th>'; |
|
168 | - $content .= '<th>' . GedcomTag::getLabel('NAME') . '</th>'; |
|
169 | - $content .= '<th>' . GedcomTag::getLabel('DEAT') . '</th>'; |
|
170 | - $content .= '<th>DEAT</th>'; |
|
171 | - $content .= '<th><i class="icon-reminder" title="' . I18N::translate('Anniversary') . '"></i></th>'; |
|
172 | - $content .= '<th>' . GedcomTag::getLabel('_YART') . '</th>'; |
|
173 | - $content .= '<th>_YART</th>'; |
|
174 | - $content .= '</tr></thead><tbody>'; |
|
163 | + $content = ''; |
|
164 | + $content .= '<div class="loading-image"> </div>'; |
|
165 | + $content .= '<table id="' . $table_id . '" class="width100" style="visibility:hidden;">'; |
|
166 | + $content .= '<thead><tr>'; |
|
167 | + $content .= '<th>' . GedcomTag::getLabel('NAME') . '</th>'; |
|
168 | + $content .= '<th>' . GedcomTag::getLabel('NAME') . '</th>'; |
|
169 | + $content .= '<th>' . GedcomTag::getLabel('DEAT') . '</th>'; |
|
170 | + $content .= '<th>DEAT</th>'; |
|
171 | + $content .= '<th><i class="icon-reminder" title="' . I18N::translate('Anniversary') . '"></i></th>'; |
|
172 | + $content .= '<th>' . GedcomTag::getLabel('_YART') . '</th>'; |
|
173 | + $content .= '<th>_YART</th>'; |
|
174 | + $content .= '</tr></thead><tbody>'; |
|
175 | 175 | |
176 | - foreach ($yahrzeits as $yahrzeit) { |
|
177 | - if ($yahrzeit->jd >= $startjd && $yahrzeit->jd < $startjd + $days) { |
|
178 | - $content .= '<tr>'; |
|
179 | - $ind = $yahrzeit->getParent(); |
|
180 | - // Individual name(s) |
|
181 | - $name = $ind->getFullName(); |
|
182 | - $url = $ind->getHtmlUrl(); |
|
183 | - $content .= '<td>'; |
|
184 | - $content .= '<a href="' . $url . '">' . $name . '</a>'; |
|
185 | - $content .= $ind->getSexImage(); |
|
186 | - $addname = $ind->getAddName(); |
|
187 | - if ($addname) { |
|
188 | - $content .= '<br><a href="' . $url . '">' . $addname . '</a>'; |
|
189 | - } |
|
190 | - $content .= '</td>'; |
|
191 | - $content .= '<td>' . $ind->getSortName() . '</td>'; |
|
176 | + foreach ($yahrzeits as $yahrzeit) { |
|
177 | + if ($yahrzeit->jd >= $startjd && $yahrzeit->jd < $startjd + $days) { |
|
178 | + $content .= '<tr>'; |
|
179 | + $ind = $yahrzeit->getParent(); |
|
180 | + // Individual name(s) |
|
181 | + $name = $ind->getFullName(); |
|
182 | + $url = $ind->getHtmlUrl(); |
|
183 | + $content .= '<td>'; |
|
184 | + $content .= '<a href="' . $url . '">' . $name . '</a>'; |
|
185 | + $content .= $ind->getSexImage(); |
|
186 | + $addname = $ind->getAddName(); |
|
187 | + if ($addname) { |
|
188 | + $content .= '<br><a href="' . $url . '">' . $addname . '</a>'; |
|
189 | + } |
|
190 | + $content .= '</td>'; |
|
191 | + $content .= '<td>' . $ind->getSortName() . '</td>'; |
|
192 | 192 | |
193 | - // death/yahrzeit event date |
|
194 | - $content .= '<td>' . $yahrzeit->getDate()->display() . '</td>'; |
|
195 | - $content .= '<td>' . $yahrzeit->getDate()->julianDay() . '</td>'; // sortable date |
|
193 | + // death/yahrzeit event date |
|
194 | + $content .= '<td>' . $yahrzeit->getDate()->display() . '</td>'; |
|
195 | + $content .= '<td>' . $yahrzeit->getDate()->julianDay() . '</td>'; // sortable date |
|
196 | 196 | |
197 | - // Anniversary |
|
198 | - $content .= '<td>' . $yahrzeit->anniv . '</td>'; |
|
197 | + // Anniversary |
|
198 | + $content .= '<td>' . $yahrzeit->anniv . '</td>'; |
|
199 | 199 | |
200 | - // upcomming yahrzeit dates |
|
201 | - switch ($calendar) { |
|
202 | - case 'gregorian': |
|
203 | - $today = new GregorianDate($yahrzeit->jd); |
|
204 | - break; |
|
205 | - case 'jewish': |
|
206 | - default: |
|
207 | - $today = new JewishDate($yahrzeit->jd); |
|
208 | - break; |
|
209 | - } |
|
200 | + // upcomming yahrzeit dates |
|
201 | + switch ($calendar) { |
|
202 | + case 'gregorian': |
|
203 | + $today = new GregorianDate($yahrzeit->jd); |
|
204 | + break; |
|
205 | + case 'jewish': |
|
206 | + default: |
|
207 | + $today = new JewishDate($yahrzeit->jd); |
|
208 | + break; |
|
209 | + } |
|
210 | 210 | $td = new Date($today->format('%@ %A %O %E')); |
211 | 211 | $content .= '<td>' . $td->display() . '</td>'; |
212 | 212 | $content .= '<td>' . $td->julianDay() . '</td>'; // sortable date |
@@ -65,29 +65,29 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public static function fileUploadErrorText($error_code) { |
67 | 67 | switch ($error_code) { |
68 | - case UPLOAD_ERR_OK: |
|
69 | - return I18N::translate('File successfully uploaded'); |
|
70 | - case UPLOAD_ERR_INI_SIZE: |
|
71 | - case UPLOAD_ERR_FORM_SIZE: |
|
72 | - // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
73 | - return I18N::translate('The uploaded file exceeds the allowed size.'); |
|
74 | - case UPLOAD_ERR_PARTIAL: |
|
75 | - // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
76 | - return I18N::translate('The file was only partially uploaded. Please try again.'); |
|
77 | - case UPLOAD_ERR_NO_FILE: |
|
78 | - // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
79 | - return I18N::translate('No file was received. Please try again.'); |
|
80 | - case UPLOAD_ERR_NO_TMP_DIR: |
|
81 | - // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
82 | - return I18N::translate('The PHP temporary folder is missing.'); |
|
83 | - case UPLOAD_ERR_CANT_WRITE: |
|
84 | - // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
85 | - return I18N::translate('PHP failed to write to disk.'); |
|
86 | - case UPLOAD_ERR_EXTENSION: |
|
87 | - // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
88 | - return I18N::translate('PHP blocked the file because of its extension.'); |
|
89 | - default: |
|
90 | - return 'Error: ' . $error_code; |
|
68 | + case UPLOAD_ERR_OK: |
|
69 | + return I18N::translate('File successfully uploaded'); |
|
70 | + case UPLOAD_ERR_INI_SIZE: |
|
71 | + case UPLOAD_ERR_FORM_SIZE: |
|
72 | + // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
73 | + return I18N::translate('The uploaded file exceeds the allowed size.'); |
|
74 | + case UPLOAD_ERR_PARTIAL: |
|
75 | + // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
76 | + return I18N::translate('The file was only partially uploaded. Please try again.'); |
|
77 | + case UPLOAD_ERR_NO_FILE: |
|
78 | + // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
79 | + return I18N::translate('No file was received. Please try again.'); |
|
80 | + case UPLOAD_ERR_NO_TMP_DIR: |
|
81 | + // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
82 | + return I18N::translate('The PHP temporary folder is missing.'); |
|
83 | + case UPLOAD_ERR_CANT_WRITE: |
|
84 | + // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
85 | + return I18N::translate('PHP failed to write to disk.'); |
|
86 | + case UPLOAD_ERR_EXTENSION: |
|
87 | + // I18N: PHP internal error message - php.net/manual/en/features.file-upload.errors.php |
|
88 | + return I18N::translate('PHP blocked the file because of its extension.'); |
|
89 | + default: |
|
90 | + return 'Error: ' . $error_code; |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
@@ -273,12 +273,12 @@ discard block |
||
273 | 273 | */ |
274 | 274 | private static function reflexivePronoun(Individual $individual) { |
275 | 275 | switch ($individual->getSex()) { |
276 | - case 'M': |
|
277 | - return /* I18N: reflexive pronoun */ I18N::translate('himself'); |
|
278 | - case 'F': |
|
279 | - return /* I18N: reflexive pronoun */ I18N::translate('herself'); |
|
280 | - default: |
|
281 | - return /* I18N: reflexive pronoun - gender neutral version of himself/herself */ I18N::translate('themself'); |
|
276 | + case 'M': |
|
277 | + return /* I18N: reflexive pronoun */ I18N::translate('himself'); |
|
278 | + case 'F': |
|
279 | + return /* I18N: reflexive pronoun */ I18N::translate('herself'); |
|
280 | + default: |
|
281 | + return /* I18N: reflexive pronoun - gender neutral version of himself/herself */ I18N::translate('themself'); |
|
282 | 282 | } |
283 | 283 | } |
284 | 284 | |
@@ -463,127 +463,127 @@ discard block |
||
463 | 463 | */ |
464 | 464 | public static function cousinName($n, $sex) { |
465 | 465 | switch ($sex) { |
466 | - case 'M': |
|
467 | - switch ($n) { |
|
468 | - case 1: |
|
469 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
470 | - return I18N::translateContext('MALE', 'first cousin'); |
|
471 | - case 2: |
|
472 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
473 | - return I18N::translateContext('MALE', 'second cousin'); |
|
474 | - case 3: |
|
475 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
476 | - return I18N::translateContext('MALE', 'third cousin'); |
|
477 | - case 4: |
|
478 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
479 | - return I18N::translateContext('MALE', 'fourth cousin'); |
|
480 | - case 5: |
|
481 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
482 | - return I18N::translateContext('MALE', 'fifth cousin'); |
|
483 | - case 6: |
|
484 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
485 | - return I18N::translateContext('MALE', 'sixth cousin'); |
|
486 | - case 7: |
|
487 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
488 | - return I18N::translateContext('MALE', 'seventh cousin'); |
|
489 | - case 8: |
|
490 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
491 | - return I18N::translateContext('MALE', 'eighth cousin'); |
|
492 | - case 9: |
|
493 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
494 | - return I18N::translateContext('MALE', 'ninth cousin'); |
|
495 | - case 10: |
|
496 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
497 | - return I18N::translateContext('MALE', 'tenth cousin'); |
|
498 | - case 11: |
|
499 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
500 | - return I18N::translateContext('MALE', 'eleventh cousin'); |
|
501 | - case 12: |
|
502 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
503 | - return I18N::translateContext('MALE', 'twelfth cousin'); |
|
504 | - case 13: |
|
505 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
506 | - return I18N::translateContext('MALE', 'thirteenth cousin'); |
|
507 | - case 14: |
|
508 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
509 | - return I18N::translateContext('MALE', 'fourteenth cousin'); |
|
510 | - case 15: |
|
511 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
512 | - return I18N::translateContext('MALE', 'fifteenth cousin'); |
|
513 | - default: |
|
514 | - /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
515 | - return I18N::translateContext('MALE', '%s × cousin', I18N::number($n)); |
|
516 | - } |
|
517 | - case 'F': |
|
518 | - switch ($n) { |
|
519 | - case 1: |
|
520 | - return I18N::translateContext('FEMALE', 'first cousin'); |
|
521 | - case 2: |
|
522 | - return I18N::translateContext('FEMALE', 'second cousin'); |
|
523 | - case 3: |
|
524 | - return I18N::translateContext('FEMALE', 'third cousin'); |
|
525 | - case 4: |
|
526 | - return I18N::translateContext('FEMALE', 'fourth cousin'); |
|
527 | - case 5: |
|
528 | - return I18N::translateContext('FEMALE', 'fifth cousin'); |
|
529 | - case 6: |
|
530 | - return I18N::translateContext('FEMALE', 'sixth cousin'); |
|
531 | - case 7: |
|
532 | - return I18N::translateContext('FEMALE', 'seventh cousin'); |
|
533 | - case 8: |
|
534 | - return I18N::translateContext('FEMALE', 'eighth cousin'); |
|
535 | - case 9: |
|
536 | - return I18N::translateContext('FEMALE', 'ninth cousin'); |
|
537 | - case 10: |
|
538 | - return I18N::translateContext('FEMALE', 'tenth cousin'); |
|
539 | - case 11: |
|
540 | - return I18N::translateContext('FEMALE', 'eleventh cousin'); |
|
541 | - case 12: |
|
542 | - return I18N::translateContext('FEMALE', 'twelfth cousin'); |
|
543 | - case 13: |
|
544 | - return I18N::translateContext('FEMALE', 'thirteenth cousin'); |
|
545 | - case 14: |
|
546 | - return I18N::translateContext('FEMALE', 'fourteenth cousin'); |
|
547 | - case 15: |
|
548 | - return I18N::translateContext('FEMALE', 'fifteenth cousin'); |
|
549 | - default: |
|
550 | - return I18N::translateContext('FEMALE', '%s × cousin', I18N::number($n)); |
|
551 | - } |
|
552 | - default: |
|
553 | - switch ($n) { |
|
554 | - case 1: |
|
555 | - return I18N::translate('first cousin'); |
|
556 | - case 2: |
|
557 | - return I18N::translate('second cousin'); |
|
558 | - case 3: |
|
559 | - return I18N::translate('third cousin'); |
|
560 | - case 4: |
|
561 | - return I18N::translate('fourth cousin'); |
|
562 | - case 5: |
|
563 | - return I18N::translate('fifth cousin'); |
|
564 | - case 6: |
|
565 | - return I18N::translate('sixth cousin'); |
|
566 | - case 7: |
|
567 | - return I18N::translate('seventh cousin'); |
|
568 | - case 8: |
|
569 | - return I18N::translate('eighth cousin'); |
|
570 | - case 9: |
|
571 | - return I18N::translate('ninth cousin'); |
|
572 | - case 10: |
|
573 | - return I18N::translate('tenth cousin'); |
|
574 | - case 11: |
|
575 | - return I18N::translate('eleventh cousin'); |
|
576 | - case 12: |
|
577 | - return I18N::translate('twelfth cousin'); |
|
578 | - case 13: |
|
579 | - return I18N::translate('thirteenth cousin'); |
|
580 | - case 14: |
|
581 | - return I18N::translate('fourteenth cousin'); |
|
582 | - case 15: |
|
583 | - return I18N::translate('fifteenth cousin'); |
|
466 | + case 'M': |
|
467 | + switch ($n) { |
|
468 | + case 1: |
|
469 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
470 | + return I18N::translateContext('MALE', 'first cousin'); |
|
471 | + case 2: |
|
472 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
473 | + return I18N::translateContext('MALE', 'second cousin'); |
|
474 | + case 3: |
|
475 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
476 | + return I18N::translateContext('MALE', 'third cousin'); |
|
477 | + case 4: |
|
478 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
479 | + return I18N::translateContext('MALE', 'fourth cousin'); |
|
480 | + case 5: |
|
481 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
482 | + return I18N::translateContext('MALE', 'fifth cousin'); |
|
483 | + case 6: |
|
484 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
485 | + return I18N::translateContext('MALE', 'sixth cousin'); |
|
486 | + case 7: |
|
487 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
488 | + return I18N::translateContext('MALE', 'seventh cousin'); |
|
489 | + case 8: |
|
490 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
491 | + return I18N::translateContext('MALE', 'eighth cousin'); |
|
492 | + case 9: |
|
493 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
494 | + return I18N::translateContext('MALE', 'ninth cousin'); |
|
495 | + case 10: |
|
496 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
497 | + return I18N::translateContext('MALE', 'tenth cousin'); |
|
498 | + case 11: |
|
499 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
500 | + return I18N::translateContext('MALE', 'eleventh cousin'); |
|
501 | + case 12: |
|
502 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
503 | + return I18N::translateContext('MALE', 'twelfth cousin'); |
|
504 | + case 13: |
|
505 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
506 | + return I18N::translateContext('MALE', 'thirteenth cousin'); |
|
507 | + case 14: |
|
508 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
509 | + return I18N::translateContext('MALE', 'fourteenth cousin'); |
|
510 | + case 15: |
|
511 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
512 | + return I18N::translateContext('MALE', 'fifteenth cousin'); |
|
513 | + default: |
|
514 | + /* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */ |
|
515 | + return I18N::translateContext('MALE', '%s × cousin', I18N::number($n)); |
|
516 | + } |
|
517 | + case 'F': |
|
518 | + switch ($n) { |
|
519 | + case 1: |
|
520 | + return I18N::translateContext('FEMALE', 'first cousin'); |
|
521 | + case 2: |
|
522 | + return I18N::translateContext('FEMALE', 'second cousin'); |
|
523 | + case 3: |
|
524 | + return I18N::translateContext('FEMALE', 'third cousin'); |
|
525 | + case 4: |
|
526 | + return I18N::translateContext('FEMALE', 'fourth cousin'); |
|
527 | + case 5: |
|
528 | + return I18N::translateContext('FEMALE', 'fifth cousin'); |
|
529 | + case 6: |
|
530 | + return I18N::translateContext('FEMALE', 'sixth cousin'); |
|
531 | + case 7: |
|
532 | + return I18N::translateContext('FEMALE', 'seventh cousin'); |
|
533 | + case 8: |
|
534 | + return I18N::translateContext('FEMALE', 'eighth cousin'); |
|
535 | + case 9: |
|
536 | + return I18N::translateContext('FEMALE', 'ninth cousin'); |
|
537 | + case 10: |
|
538 | + return I18N::translateContext('FEMALE', 'tenth cousin'); |
|
539 | + case 11: |
|
540 | + return I18N::translateContext('FEMALE', 'eleventh cousin'); |
|
541 | + case 12: |
|
542 | + return I18N::translateContext('FEMALE', 'twelfth cousin'); |
|
543 | + case 13: |
|
544 | + return I18N::translateContext('FEMALE', 'thirteenth cousin'); |
|
545 | + case 14: |
|
546 | + return I18N::translateContext('FEMALE', 'fourteenth cousin'); |
|
547 | + case 15: |
|
548 | + return I18N::translateContext('FEMALE', 'fifteenth cousin'); |
|
549 | + default: |
|
550 | + return I18N::translateContext('FEMALE', '%s × cousin', I18N::number($n)); |
|
551 | + } |
|
584 | 552 | default: |
585 | - return I18N::translate('%s × cousin', I18N::number($n)); |
|
586 | - } |
|
553 | + switch ($n) { |
|
554 | + case 1: |
|
555 | + return I18N::translate('first cousin'); |
|
556 | + case 2: |
|
557 | + return I18N::translate('second cousin'); |
|
558 | + case 3: |
|
559 | + return I18N::translate('third cousin'); |
|
560 | + case 4: |
|
561 | + return I18N::translate('fourth cousin'); |
|
562 | + case 5: |
|
563 | + return I18N::translate('fifth cousin'); |
|
564 | + case 6: |
|
565 | + return I18N::translate('sixth cousin'); |
|
566 | + case 7: |
|
567 | + return I18N::translate('seventh cousin'); |
|
568 | + case 8: |
|
569 | + return I18N::translate('eighth cousin'); |
|
570 | + case 9: |
|
571 | + return I18N::translate('ninth cousin'); |
|
572 | + case 10: |
|
573 | + return I18N::translate('tenth cousin'); |
|
574 | + case 11: |
|
575 | + return I18N::translate('eleventh cousin'); |
|
576 | + case 12: |
|
577 | + return I18N::translate('twelfth cousin'); |
|
578 | + case 13: |
|
579 | + return I18N::translate('thirteenth cousin'); |
|
580 | + case 14: |
|
581 | + return I18N::translate('fourteenth cousin'); |
|
582 | + case 15: |
|
583 | + return I18N::translate('fifteenth cousin'); |
|
584 | + default: |
|
585 | + return I18N::translate('%s × cousin', I18N::number($n)); |
|
586 | + } |
|
587 | 587 | } |
588 | 588 | } |
589 | 589 | |
@@ -599,51 +599,51 @@ discard block |
||
599 | 599 | */ |
600 | 600 | public static function cousinName2($n, $sex, $relation) { |
601 | 601 | switch ($sex) { |
602 | - case 'M': |
|
603 | - switch ($n) { |
|
604 | - case 1: |
|
605 | - return /* I18N: A Spanish relationship name, such as third great-nephew */ I18N::translateContext('MALE', 'first %s', $relation); |
|
606 | - case 2: |
|
607 | - return I18N::translateContext('MALE', 'second %s', $relation); |
|
608 | - case 3: |
|
609 | - return I18N::translateContext('MALE', 'third %s', $relation); |
|
610 | - case 4: |
|
611 | - return I18N::translateContext('MALE', 'fourth %s', $relation); |
|
612 | - case 5: |
|
613 | - return I18N::translateContext('MALE', 'fifth %s', $relation); |
|
614 | - default: |
|
615 | - return /* I18N: A Spanish relationship name, such as third great-nephew */ I18N::translateContext('MALE', '%1$s × %2$s', I18N::number($n), $relation); |
|
616 | - } |
|
617 | - case 'F': |
|
618 | - switch ($n) { |
|
619 | - case 1: |
|
620 | - return /* I18N: A Spanish relationship name, such as third great-nephew */ I18N::translateContext('FEMALE', 'first %s', $relation); |
|
621 | - case 2: |
|
622 | - return I18N::translateContext('FEMALE', 'second %s', $relation); |
|
623 | - case 3: |
|
624 | - return I18N::translateContext('FEMALE', 'third %s', $relation); |
|
625 | - case 4: |
|
626 | - return I18N::translateContext('FEMALE', 'fourth %s', $relation); |
|
627 | - case 5: |
|
628 | - return I18N::translateContext('FEMALE', 'fifth %s', $relation); |
|
629 | - default: // I18N: A Spanish relationship name, such as third great-nephew |
|
630 | - return I18N::translateContext('FEMALE', '%1$s × %2$s', I18N::number($n), $relation); |
|
631 | - } |
|
632 | - default: |
|
633 | - switch ($n) { |
|
634 | - case 1: |
|
635 | - return /* I18N: A Spanish relationship name, such as first great-nephew */ I18N::translate('first %s', $relation); |
|
636 | - case 2: |
|
637 | - return /* I18N: A Spanish relationship name, such as second great-nephew */ I18N::translate('second %s', $relation); |
|
638 | - case 3: |
|
639 | - return /* I18N: A Spanish relationship name, such as third great-nephew */ I18N::translate('third %s', $relation); |
|
640 | - case 4: |
|
641 | - return /* I18N: A Spanish relationship name, such as fourth great-nephew */ I18N::translate('fourth %s', $relation); |
|
642 | - case 5: |
|
643 | - return /* I18N: A Spanish relationship name, such as fifth great-nephew */ I18N::translate('fifth %s', $relation); |
|
602 | + case 'M': |
|
603 | + switch ($n) { |
|
604 | + case 1: |
|
605 | + return /* I18N: A Spanish relationship name, such as third great-nephew */ I18N::translateContext('MALE', 'first %s', $relation); |
|
606 | + case 2: |
|
607 | + return I18N::translateContext('MALE', 'second %s', $relation); |
|
608 | + case 3: |
|
609 | + return I18N::translateContext('MALE', 'third %s', $relation); |
|
610 | + case 4: |
|
611 | + return I18N::translateContext('MALE', 'fourth %s', $relation); |
|
612 | + case 5: |
|
613 | + return I18N::translateContext('MALE', 'fifth %s', $relation); |
|
614 | + default: |
|
615 | + return /* I18N: A Spanish relationship name, such as third great-nephew */ I18N::translateContext('MALE', '%1$s × %2$s', I18N::number($n), $relation); |
|
616 | + } |
|
617 | + case 'F': |
|
618 | + switch ($n) { |
|
619 | + case 1: |
|
620 | + return /* I18N: A Spanish relationship name, such as third great-nephew */ I18N::translateContext('FEMALE', 'first %s', $relation); |
|
621 | + case 2: |
|
622 | + return I18N::translateContext('FEMALE', 'second %s', $relation); |
|
623 | + case 3: |
|
624 | + return I18N::translateContext('FEMALE', 'third %s', $relation); |
|
625 | + case 4: |
|
626 | + return I18N::translateContext('FEMALE', 'fourth %s', $relation); |
|
627 | + case 5: |
|
628 | + return I18N::translateContext('FEMALE', 'fifth %s', $relation); |
|
629 | + default: // I18N: A Spanish relationship name, such as third great-nephew |
|
630 | + return I18N::translateContext('FEMALE', '%1$s × %2$s', I18N::number($n), $relation); |
|
631 | + } |
|
644 | 632 | default: |
645 | - return /* I18N: A Spanish relationship name, such as 7th great-nephew */ I18N::translate('%1$s × %2$s', I18N::number($n), $relation); |
|
646 | - } |
|
633 | + switch ($n) { |
|
634 | + case 1: |
|
635 | + return /* I18N: A Spanish relationship name, such as first great-nephew */ I18N::translate('first %s', $relation); |
|
636 | + case 2: |
|
637 | + return /* I18N: A Spanish relationship name, such as second great-nephew */ I18N::translate('second %s', $relation); |
|
638 | + case 3: |
|
639 | + return /* I18N: A Spanish relationship name, such as third great-nephew */ I18N::translate('third %s', $relation); |
|
640 | + case 4: |
|
641 | + return /* I18N: A Spanish relationship name, such as fourth great-nephew */ I18N::translate('fourth %s', $relation); |
|
642 | + case 5: |
|
643 | + return /* I18N: A Spanish relationship name, such as fifth great-nephew */ I18N::translate('fifth %s', $relation); |
|
644 | + default: |
|
645 | + return /* I18N: A Spanish relationship name, such as 7th great-nephew */ I18N::translate('%1$s × %2$s', I18N::number($n), $relation); |
|
646 | + } |
|
647 | 647 | } |
648 | 648 | } |
649 | 649 | |
@@ -680,796 +680,796 @@ discard block |
||
680 | 680 | } |
681 | 681 | |
682 | 682 | switch ($path) { |
683 | - case '': |
|
684 | - return I18N::translate('self'); |
|
685 | - // Level One relationships |
|
686 | - case 'mot': |
|
687 | - return I18N::translate('mother'); |
|
688 | - case 'fat': |
|
689 | - return I18N::translate('father'); |
|
690 | - case 'par': |
|
691 | - return I18N::translate('parent'); |
|
692 | - case 'hus': |
|
693 | - if ($person1 && $person2) { |
|
694 | - foreach ($person1->getSpouseFamilies() as $family) { |
|
695 | - if ($person2 === $family->getSpouse($person1)) { |
|
696 | - if ($family->getFacts('_NMR')) { |
|
697 | - if ($family->getFacts(WT_EVENTS_DIV)) { |
|
698 | - return I18N::translateContext('MALE', 'ex-partner'); |
|
699 | - } else { |
|
700 | - return I18N::translateContext('MALE', 'partner'); |
|
683 | + case '': |
|
684 | + return I18N::translate('self'); |
|
685 | + // Level One relationships |
|
686 | + case 'mot': |
|
687 | + return I18N::translate('mother'); |
|
688 | + case 'fat': |
|
689 | + return I18N::translate('father'); |
|
690 | + case 'par': |
|
691 | + return I18N::translate('parent'); |
|
692 | + case 'hus': |
|
693 | + if ($person1 && $person2) { |
|
694 | + foreach ($person1->getSpouseFamilies() as $family) { |
|
695 | + if ($person2 === $family->getSpouse($person1)) { |
|
696 | + if ($family->getFacts('_NMR')) { |
|
697 | + if ($family->getFacts(WT_EVENTS_DIV)) { |
|
698 | + return I18N::translateContext('MALE', 'ex-partner'); |
|
699 | + } else { |
|
700 | + return I18N::translateContext('MALE', 'partner'); |
|
701 | + } |
|
702 | + } elseif ($family->getFacts(WT_EVENTS_DIV)) { |
|
703 | + return I18N::translate('ex-husband'); |
|
701 | 704 | } |
702 | - } elseif ($family->getFacts(WT_EVENTS_DIV)) { |
|
703 | - return I18N::translate('ex-husband'); |
|
704 | 705 | } |
705 | 706 | } |
706 | 707 | } |
707 | - } |
|
708 | 708 | |
709 | - return I18N::translate('husband'); |
|
710 | - case 'wif': |
|
711 | - if ($person1 && $person2) { |
|
712 | - foreach ($person1->getSpouseFamilies() as $family) { |
|
713 | - if ($person2 === $family->getSpouse($person1)) { |
|
714 | - if ($family->getFacts('_NMR')) { |
|
715 | - if ($family->getFacts(WT_EVENTS_DIV)) { |
|
716 | - return I18N::translateContext('FEMALE', 'ex-partner'); |
|
717 | - } else { |
|
718 | - return I18N::translateContext('FEMALE', 'partner'); |
|
709 | + return I18N::translate('husband'); |
|
710 | + case 'wif': |
|
711 | + if ($person1 && $person2) { |
|
712 | + foreach ($person1->getSpouseFamilies() as $family) { |
|
713 | + if ($person2 === $family->getSpouse($person1)) { |
|
714 | + if ($family->getFacts('_NMR')) { |
|
715 | + if ($family->getFacts(WT_EVENTS_DIV)) { |
|
716 | + return I18N::translateContext('FEMALE', 'ex-partner'); |
|
717 | + } else { |
|
718 | + return I18N::translateContext('FEMALE', 'partner'); |
|
719 | + } |
|
720 | + } elseif ($family->getFacts(WT_EVENTS_DIV)) { |
|
721 | + return I18N::translate('ex-wife'); |
|
719 | 722 | } |
720 | - } elseif ($family->getFacts(WT_EVENTS_DIV)) { |
|
721 | - return I18N::translate('ex-wife'); |
|
722 | 723 | } |
723 | 724 | } |
724 | 725 | } |
725 | - } |
|
726 | 726 | |
727 | - return I18N::translate('wife'); |
|
728 | - case 'spo': |
|
729 | - if ($person1 && $person2) { |
|
730 | - foreach ($person1->getSpouseFamilies() as $family) { |
|
731 | - if ($person2 === $family->getSpouse($person1)) { |
|
732 | - if ($family->getFacts('_NMR')) { |
|
733 | - if ($family->getFacts(WT_EVENTS_DIV)) { |
|
734 | - return I18N::translate('ex-partner'); |
|
735 | - } else { |
|
736 | - return I18N::translate('partner'); |
|
727 | + return I18N::translate('wife'); |
|
728 | + case 'spo': |
|
729 | + if ($person1 && $person2) { |
|
730 | + foreach ($person1->getSpouseFamilies() as $family) { |
|
731 | + if ($person2 === $family->getSpouse($person1)) { |
|
732 | + if ($family->getFacts('_NMR')) { |
|
733 | + if ($family->getFacts(WT_EVENTS_DIV)) { |
|
734 | + return I18N::translate('ex-partner'); |
|
735 | + } else { |
|
736 | + return I18N::translate('partner'); |
|
737 | + } |
|
738 | + } elseif ($family->getFacts(WT_EVENTS_DIV)) { |
|
739 | + return I18N::translate('ex-spouse'); |
|
737 | 740 | } |
738 | - } elseif ($family->getFacts(WT_EVENTS_DIV)) { |
|
739 | - return I18N::translate('ex-spouse'); |
|
740 | 741 | } |
741 | 742 | } |
742 | 743 | } |
743 | - } |
|
744 | 744 | |
745 | - return I18N::translate('spouse'); |
|
746 | - case 'son': |
|
747 | - return I18N::translate('son'); |
|
748 | - case 'dau': |
|
749 | - return I18N::translate('daughter'); |
|
750 | - case 'chi': |
|
751 | - return I18N::translate('child'); |
|
752 | - case 'bro': |
|
753 | - if ($person1 && $person2) { |
|
754 | - $dob1 = $person1->getBirthDate(); |
|
755 | - $dob2 = $person2->getBirthDate(); |
|
756 | - if ($dob1->isOK() && $dob2->isOK()) { |
|
757 | - if (abs($dob1->julianDay() - $dob2->julianDay()) < 2 && !$dob1->minimumDate()->d !== 0 && !$dob2->minimumDate()->d !== 0) { |
|
758 | - // Exclude BEF, AFT, etc. |
|
759 | - return I18N::translate('twin brother'); |
|
760 | - } elseif ($dob1->maximumJulianDay() < $dob2->minimumJulianDay()) { |
|
761 | - return I18N::translate('younger brother'); |
|
762 | - } elseif ($dob1->minimumJulianDay() > $dob2->maximumJulianDay()) { |
|
763 | - return I18N::translate('elder brother'); |
|
745 | + return I18N::translate('spouse'); |
|
746 | + case 'son': |
|
747 | + return I18N::translate('son'); |
|
748 | + case 'dau': |
|
749 | + return I18N::translate('daughter'); |
|
750 | + case 'chi': |
|
751 | + return I18N::translate('child'); |
|
752 | + case 'bro': |
|
753 | + if ($person1 && $person2) { |
|
754 | + $dob1 = $person1->getBirthDate(); |
|
755 | + $dob2 = $person2->getBirthDate(); |
|
756 | + if ($dob1->isOK() && $dob2->isOK()) { |
|
757 | + if (abs($dob1->julianDay() - $dob2->julianDay()) < 2 && !$dob1->minimumDate()->d !== 0 && !$dob2->minimumDate()->d !== 0) { |
|
758 | + // Exclude BEF, AFT, etc. |
|
759 | + return I18N::translate('twin brother'); |
|
760 | + } elseif ($dob1->maximumJulianDay() < $dob2->minimumJulianDay()) { |
|
761 | + return I18N::translate('younger brother'); |
|
762 | + } elseif ($dob1->minimumJulianDay() > $dob2->maximumJulianDay()) { |
|
763 | + return I18N::translate('elder brother'); |
|
764 | + } |
|
764 | 765 | } |
765 | 766 | } |
766 | - } |
|
767 | 767 | |
768 | - return I18N::translate('brother'); |
|
769 | - case 'sis': |
|
770 | - if ($person1 && $person2) { |
|
771 | - $dob1 = $person1->getBirthDate(); |
|
772 | - $dob2 = $person2->getBirthDate(); |
|
773 | - if ($dob1->isOK() && $dob2->isOK()) { |
|
774 | - if (abs($dob1->julianDay() - $dob2->julianDay()) < 2 && !$dob1->minimumDate()->d !== 0 && !$dob2->minimumDate()->d !== 0) { |
|
775 | - // Exclude BEF, AFT, etc. |
|
776 | - return I18N::translate('twin sister'); |
|
777 | - } elseif ($dob1->maximumJulianDay() < $dob2->minimumJulianDay()) { |
|
778 | - return I18N::translate('younger sister'); |
|
779 | - } elseif ($dob1->minimumJulianDay() > $dob2->maximumJulianDay()) { |
|
780 | - return I18N::translate('elder sister'); |
|
768 | + return I18N::translate('brother'); |
|
769 | + case 'sis': |
|
770 | + if ($person1 && $person2) { |
|
771 | + $dob1 = $person1->getBirthDate(); |
|
772 | + $dob2 = $person2->getBirthDate(); |
|
773 | + if ($dob1->isOK() && $dob2->isOK()) { |
|
774 | + if (abs($dob1->julianDay() - $dob2->julianDay()) < 2 && !$dob1->minimumDate()->d !== 0 && !$dob2->minimumDate()->d !== 0) { |
|
775 | + // Exclude BEF, AFT, etc. |
|
776 | + return I18N::translate('twin sister'); |
|
777 | + } elseif ($dob1->maximumJulianDay() < $dob2->minimumJulianDay()) { |
|
778 | + return I18N::translate('younger sister'); |
|
779 | + } elseif ($dob1->minimumJulianDay() > $dob2->maximumJulianDay()) { |
|
780 | + return I18N::translate('elder sister'); |
|
781 | + } |
|
781 | 782 | } |
782 | 783 | } |
783 | - } |
|
784 | 784 | |
785 | - return I18N::translate('sister'); |
|
786 | - case 'sib': |
|
787 | - if ($person1 && $person2) { |
|
788 | - $dob1 = $person1->getBirthDate(); |
|
789 | - $dob2 = $person2->getBirthDate(); |
|
790 | - if ($dob1->isOK() && $dob2->isOK()) { |
|
791 | - if (abs($dob1->julianDay() - $dob2->julianDay()) < 2 && !$dob1->minimumDate()->d !== 0 && !$dob2->minimumDate()->d !== 0) { |
|
792 | - // Exclude BEF, AFT, etc. |
|
793 | - return I18N::translate('twin sibling'); |
|
794 | - } elseif ($dob1->maximumJulianDay() < $dob2->minimumJulianDay()) { |
|
795 | - return I18N::translate('younger sibling'); |
|
796 | - } elseif ($dob1->minimumJulianDay() > $dob2->maximumJulianDay()) { |
|
797 | - return I18N::translate('elder sibling'); |
|
785 | + return I18N::translate('sister'); |
|
786 | + case 'sib': |
|
787 | + if ($person1 && $person2) { |
|
788 | + $dob1 = $person1->getBirthDate(); |
|
789 | + $dob2 = $person2->getBirthDate(); |
|
790 | + if ($dob1->isOK() && $dob2->isOK()) { |
|
791 | + if (abs($dob1->julianDay() - $dob2->julianDay()) < 2 && !$dob1->minimumDate()->d !== 0 && !$dob2->minimumDate()->d !== 0) { |
|
792 | + // Exclude BEF, AFT, etc. |
|
793 | + return I18N::translate('twin sibling'); |
|
794 | + } elseif ($dob1->maximumJulianDay() < $dob2->minimumJulianDay()) { |
|
795 | + return I18N::translate('younger sibling'); |
|
796 | + } elseif ($dob1->minimumJulianDay() > $dob2->maximumJulianDay()) { |
|
797 | + return I18N::translate('elder sibling'); |
|
798 | + } |
|
798 | 799 | } |
799 | 800 | } |
800 | - } |
|
801 | 801 | |
802 | - return I18N::translate('sibling'); |
|
802 | + return I18N::translate('sibling'); |
|
803 | 803 | |
804 | - // Level Two relationships |
|
805 | - case 'brochi': |
|
806 | - return I18N::translateContext('brother’s child', 'nephew/niece'); |
|
807 | - case 'brodau': |
|
808 | - return I18N::translateContext('brother’s daughter', 'niece'); |
|
809 | - case 'broson': |
|
810 | - return I18N::translateContext('brother’s son', 'nephew'); |
|
811 | - case 'browif': |
|
812 | - return I18N::translateContext('brother’s wife', 'sister-in-law'); |
|
813 | - case 'chichi': |
|
814 | - return I18N::translateContext('child’s child', 'grandchild'); |
|
815 | - case 'chidau': |
|
816 | - return I18N::translateContext('child’s daughter', 'granddaughter'); |
|
817 | - case 'chihus': |
|
818 | - return I18N::translateContext('child’s husband', 'son-in-law'); |
|
819 | - case 'chison': |
|
820 | - return I18N::translateContext('child’s son', 'grandson'); |
|
821 | - case 'chispo': |
|
822 | - return I18N::translateContext('child’s spouse', 'son/daughter-in-law'); |
|
823 | - case 'chiwif': |
|
824 | - return I18N::translateContext('child’s wife', 'daughter-in-law'); |
|
825 | - case 'dauchi': |
|
826 | - return I18N::translateContext('daughter’s child', 'grandchild'); |
|
827 | - case 'daudau': |
|
828 | - return I18N::translateContext('daughter’s daughter', 'granddaughter'); |
|
829 | - case 'dauhus': |
|
830 | - return I18N::translateContext('daughter’s husband', 'son-in-law'); |
|
831 | - case 'dauson': |
|
832 | - return I18N::translateContext('daughter’s son', 'grandson'); |
|
833 | - case 'fatbro': |
|
834 | - return I18N::translateContext('father’s brother', 'uncle'); |
|
835 | - case 'fatchi': |
|
836 | - return I18N::translateContext('father’s child', 'half-sibling'); |
|
837 | - case 'fatdau': |
|
838 | - return I18N::translateContext('father’s daughter', 'half-sister'); |
|
839 | - case 'fatfat': |
|
840 | - return I18N::translateContext('father’s father', 'paternal grandfather'); |
|
841 | - case 'fatmot': |
|
842 | - return I18N::translateContext('father’s mother', 'paternal grandmother'); |
|
843 | - case 'fatpar': |
|
844 | - return I18N::translateContext('father’s parent', 'paternal grandparent'); |
|
845 | - case 'fatsib': |
|
846 | - return I18N::translateContext('father’s sibling', 'aunt/uncle'); |
|
847 | - case 'fatsis': |
|
848 | - return I18N::translateContext('father’s sister', 'aunt'); |
|
849 | - case 'fatson': |
|
850 | - return I18N::translateContext('father’s son', 'half-brother'); |
|
851 | - case 'fatwif': |
|
852 | - return I18N::translateContext('father’s wife', 'step-mother'); |
|
853 | - case 'husbro': |
|
854 | - return I18N::translateContext('husband’s brother', 'brother-in-law'); |
|
855 | - case 'huschi': |
|
856 | - return I18N::translateContext('husband’s child', 'step-child'); |
|
857 | - case 'husdau': |
|
858 | - return I18N::translateContext('husband’s daughter', 'step-daughter'); |
|
859 | - case 'husfat': |
|
860 | - return I18N::translateContext('husband’s father', 'father-in-law'); |
|
861 | - case 'husmot': |
|
862 | - return I18N::translateContext('husband’s mother', 'mother-in-law'); |
|
863 | - case 'hussib': |
|
864 | - return I18N::translateContext('husband’s sibling', 'brother/sister-in-law'); |
|
865 | - case 'hussis': |
|
866 | - return I18N::translateContext('husband’s sister', 'sister-in-law'); |
|
867 | - case 'husson': |
|
868 | - return I18N::translateContext('husband’s son', 'step-son'); |
|
869 | - case 'motbro': |
|
870 | - return I18N::translateContext('mother’s brother', 'uncle'); |
|
871 | - case 'motchi': |
|
872 | - return I18N::translateContext('mother’s child', 'half-sibling'); |
|
873 | - case 'motdau': |
|
874 | - return I18N::translateContext('mother’s daughter', 'half-sister'); |
|
875 | - case 'motfat': |
|
876 | - return I18N::translateContext('mother’s father', 'maternal grandfather'); |
|
877 | - case 'mothus': |
|
878 | - return I18N::translateContext('mother’s husband', 'step-father'); |
|
879 | - case 'motmot': |
|
880 | - return I18N::translateContext('mother’s mother', 'maternal grandmother'); |
|
881 | - case 'motpar': |
|
882 | - return I18N::translateContext('mother’s parent', 'maternal grandparent'); |
|
883 | - case 'motsib': |
|
884 | - return I18N::translateContext('mother’s sibling', 'aunt/uncle'); |
|
885 | - case 'motsis': |
|
886 | - return I18N::translateContext('mother’s sister', 'aunt'); |
|
887 | - case 'motson': |
|
888 | - return I18N::translateContext('mother’s son', 'half-brother'); |
|
889 | - case 'parbro': |
|
890 | - return I18N::translateContext('parent’s brother', 'uncle'); |
|
891 | - case 'parchi': |
|
892 | - return I18N::translateContext('parent’s child', 'half-sibling'); |
|
893 | - case 'pardau': |
|
894 | - return I18N::translateContext('parent’s daughter', 'half-sister'); |
|
895 | - case 'parfat': |
|
896 | - return I18N::translateContext('parent’s father', 'grandfather'); |
|
897 | - case 'parmot': |
|
898 | - return I18N::translateContext('parent’s mother', 'grandmother'); |
|
899 | - case 'parpar': |
|
900 | - return I18N::translateContext('parent’s parent', 'grandparent'); |
|
901 | - case 'parsib': |
|
902 | - return I18N::translateContext('parent’s sibling', 'aunt/uncle'); |
|
903 | - case 'parsis': |
|
904 | - return I18N::translateContext('parent’s sister', 'aunt'); |
|
905 | - case 'parson': |
|
906 | - return I18N::translateContext('parent’s son', 'half-brother'); |
|
907 | - case 'parspo': |
|
908 | - return I18N::translateContext('parent’s spouse', 'step-parent'); |
|
909 | - case 'sibchi': |
|
910 | - return I18N::translateContext('sibling’s child', 'nephew/niece'); |
|
911 | - case 'sibdau': |
|
912 | - return I18N::translateContext('sibling’s daughter', 'niece'); |
|
913 | - case 'sibson': |
|
914 | - return I18N::translateContext('sibling’s son', 'nephew'); |
|
915 | - case 'sibspo': |
|
916 | - return I18N::translateContext('sibling’s spouse', 'brother/sister-in-law'); |
|
917 | - case 'sischi': |
|
918 | - return I18N::translateContext('sister’s child', 'nephew/niece'); |
|
919 | - case 'sisdau': |
|
920 | - return I18N::translateContext('sister’s daughter', 'niece'); |
|
921 | - case 'sishus': |
|
922 | - return I18N::translateContext('sister’s husband', 'brother-in-law'); |
|
923 | - case 'sisson': |
|
924 | - return I18N::translateContext('sister’s son', 'nephew'); |
|
925 | - case 'sonchi': |
|
926 | - return I18N::translateContext('son’s child', 'grandchild'); |
|
927 | - case 'sondau': |
|
928 | - return I18N::translateContext('son’s daughter', 'granddaughter'); |
|
929 | - case 'sonson': |
|
930 | - return I18N::translateContext('son’s son', 'grandson'); |
|
931 | - case 'sonwif': |
|
932 | - return I18N::translateContext('son’s wife', 'daughter-in-law'); |
|
933 | - case 'spobro': |
|
934 | - return I18N::translateContext('spouse’s brother', 'brother-in-law'); |
|
935 | - case 'spochi': |
|
936 | - return I18N::translateContext('spouse’s child', 'step-child'); |
|
937 | - case 'spodau': |
|
938 | - return I18N::translateContext('spouse’s daughter', 'step-daughter'); |
|
939 | - case 'spofat': |
|
940 | - return I18N::translateContext('spouse’s father', 'father-in-law'); |
|
941 | - case 'spomot': |
|
942 | - return I18N::translateContext('spouse’s mother', 'mother-in-law'); |
|
943 | - case 'sposis': |
|
944 | - return I18N::translateContext('spouse’s sister', 'sister-in-law'); |
|
945 | - case 'sposon': |
|
946 | - return I18N::translateContext('spouse’s son', 'step-son'); |
|
947 | - case 'spopar': |
|
948 | - return I18N::translateContext('spouse’s parent', 'mother/father-in-law'); |
|
949 | - case 'sposib': |
|
950 | - return I18N::translateContext('spouse’s sibling', 'brother/sister-in-law'); |
|
951 | - case 'wifbro': |
|
952 | - return I18N::translateContext('wife’s brother', 'brother-in-law'); |
|
953 | - case 'wifchi': |
|
954 | - return I18N::translateContext('wife’s child', 'step-child'); |
|
955 | - case 'wifdau': |
|
956 | - return I18N::translateContext('wife’s daughter', 'step-daughter'); |
|
957 | - case 'wiffat': |
|
958 | - return I18N::translateContext('wife’s father', 'father-in-law'); |
|
959 | - case 'wifmot': |
|
960 | - return I18N::translateContext('wife’s mother', 'mother-in-law'); |
|
961 | - case 'wifsib': |
|
962 | - return I18N::translateContext('wife’s sibling', 'brother/sister-in-law'); |
|
963 | - case 'wifsis': |
|
964 | - return I18N::translateContext('wife’s sister', 'sister-in-law'); |
|
965 | - case 'wifson': |
|
966 | - return I18N::translateContext('wife’s son', 'step-son'); |
|
804 | + // Level Two relationships |
|
805 | + case 'brochi': |
|
806 | + return I18N::translateContext('brother’s child', 'nephew/niece'); |
|
807 | + case 'brodau': |
|
808 | + return I18N::translateContext('brother’s daughter', 'niece'); |
|
809 | + case 'broson': |
|
810 | + return I18N::translateContext('brother’s son', 'nephew'); |
|
811 | + case 'browif': |
|
812 | + return I18N::translateContext('brother’s wife', 'sister-in-law'); |
|
813 | + case 'chichi': |
|
814 | + return I18N::translateContext('child’s child', 'grandchild'); |
|
815 | + case 'chidau': |
|
816 | + return I18N::translateContext('child’s daughter', 'granddaughter'); |
|
817 | + case 'chihus': |
|
818 | + return I18N::translateContext('child’s husband', 'son-in-law'); |
|
819 | + case 'chison': |
|
820 | + return I18N::translateContext('child’s son', 'grandson'); |
|
821 | + case 'chispo': |
|
822 | + return I18N::translateContext('child’s spouse', 'son/daughter-in-law'); |
|
823 | + case 'chiwif': |
|
824 | + return I18N::translateContext('child’s wife', 'daughter-in-law'); |
|
825 | + case 'dauchi': |
|
826 | + return I18N::translateContext('daughter’s child', 'grandchild'); |
|
827 | + case 'daudau': |
|
828 | + return I18N::translateContext('daughter’s daughter', 'granddaughter'); |
|
829 | + case 'dauhus': |
|
830 | + return I18N::translateContext('daughter’s husband', 'son-in-law'); |
|
831 | + case 'dauson': |
|
832 | + return I18N::translateContext('daughter’s son', 'grandson'); |
|
833 | + case 'fatbro': |
|
834 | + return I18N::translateContext('father’s brother', 'uncle'); |
|
835 | + case 'fatchi': |
|
836 | + return I18N::translateContext('father’s child', 'half-sibling'); |
|
837 | + case 'fatdau': |
|
838 | + return I18N::translateContext('father’s daughter', 'half-sister'); |
|
839 | + case 'fatfat': |
|
840 | + return I18N::translateContext('father’s father', 'paternal grandfather'); |
|
841 | + case 'fatmot': |
|
842 | + return I18N::translateContext('father’s mother', 'paternal grandmother'); |
|
843 | + case 'fatpar': |
|
844 | + return I18N::translateContext('father’s parent', 'paternal grandparent'); |
|
845 | + case 'fatsib': |
|
846 | + return I18N::translateContext('father’s sibling', 'aunt/uncle'); |
|
847 | + case 'fatsis': |
|
848 | + return I18N::translateContext('father’s sister', 'aunt'); |
|
849 | + case 'fatson': |
|
850 | + return I18N::translateContext('father’s son', 'half-brother'); |
|
851 | + case 'fatwif': |
|
852 | + return I18N::translateContext('father’s wife', 'step-mother'); |
|
853 | + case 'husbro': |
|
854 | + return I18N::translateContext('husband’s brother', 'brother-in-law'); |
|
855 | + case 'huschi': |
|
856 | + return I18N::translateContext('husband’s child', 'step-child'); |
|
857 | + case 'husdau': |
|
858 | + return I18N::translateContext('husband’s daughter', 'step-daughter'); |
|
859 | + case 'husfat': |
|
860 | + return I18N::translateContext('husband’s father', 'father-in-law'); |
|
861 | + case 'husmot': |
|
862 | + return I18N::translateContext('husband’s mother', 'mother-in-law'); |
|
863 | + case 'hussib': |
|
864 | + return I18N::translateContext('husband’s sibling', 'brother/sister-in-law'); |
|
865 | + case 'hussis': |
|
866 | + return I18N::translateContext('husband’s sister', 'sister-in-law'); |
|
867 | + case 'husson': |
|
868 | + return I18N::translateContext('husband’s son', 'step-son'); |
|
869 | + case 'motbro': |
|
870 | + return I18N::translateContext('mother’s brother', 'uncle'); |
|
871 | + case 'motchi': |
|
872 | + return I18N::translateContext('mother’s child', 'half-sibling'); |
|
873 | + case 'motdau': |
|
874 | + return I18N::translateContext('mother’s daughter', 'half-sister'); |
|
875 | + case 'motfat': |
|
876 | + return I18N::translateContext('mother’s father', 'maternal grandfather'); |
|
877 | + case 'mothus': |
|
878 | + return I18N::translateContext('mother’s husband', 'step-father'); |
|
879 | + case 'motmot': |
|
880 | + return I18N::translateContext('mother’s mother', 'maternal grandmother'); |
|
881 | + case 'motpar': |
|
882 | + return I18N::translateContext('mother’s parent', 'maternal grandparent'); |
|
883 | + case 'motsib': |
|
884 | + return I18N::translateContext('mother’s sibling', 'aunt/uncle'); |
|
885 | + case 'motsis': |
|
886 | + return I18N::translateContext('mother’s sister', 'aunt'); |
|
887 | + case 'motson': |
|
888 | + return I18N::translateContext('mother’s son', 'half-brother'); |
|
889 | + case 'parbro': |
|
890 | + return I18N::translateContext('parent’s brother', 'uncle'); |
|
891 | + case 'parchi': |
|
892 | + return I18N::translateContext('parent’s child', 'half-sibling'); |
|
893 | + case 'pardau': |
|
894 | + return I18N::translateContext('parent’s daughter', 'half-sister'); |
|
895 | + case 'parfat': |
|
896 | + return I18N::translateContext('parent’s father', 'grandfather'); |
|
897 | + case 'parmot': |
|
898 | + return I18N::translateContext('parent’s mother', 'grandmother'); |
|
899 | + case 'parpar': |
|
900 | + return I18N::translateContext('parent’s parent', 'grandparent'); |
|
901 | + case 'parsib': |
|
902 | + return I18N::translateContext('parent’s sibling', 'aunt/uncle'); |
|
903 | + case 'parsis': |
|
904 | + return I18N::translateContext('parent’s sister', 'aunt'); |
|
905 | + case 'parson': |
|
906 | + return I18N::translateContext('parent’s son', 'half-brother'); |
|
907 | + case 'parspo': |
|
908 | + return I18N::translateContext('parent’s spouse', 'step-parent'); |
|
909 | + case 'sibchi': |
|
910 | + return I18N::translateContext('sibling’s child', 'nephew/niece'); |
|
911 | + case 'sibdau': |
|
912 | + return I18N::translateContext('sibling’s daughter', 'niece'); |
|
913 | + case 'sibson': |
|
914 | + return I18N::translateContext('sibling’s son', 'nephew'); |
|
915 | + case 'sibspo': |
|
916 | + return I18N::translateContext('sibling’s spouse', 'brother/sister-in-law'); |
|
917 | + case 'sischi': |
|
918 | + return I18N::translateContext('sister’s child', 'nephew/niece'); |
|
919 | + case 'sisdau': |
|
920 | + return I18N::translateContext('sister’s daughter', 'niece'); |
|
921 | + case 'sishus': |
|
922 | + return I18N::translateContext('sister’s husband', 'brother-in-law'); |
|
923 | + case 'sisson': |
|
924 | + return I18N::translateContext('sister’s son', 'nephew'); |
|
925 | + case 'sonchi': |
|
926 | + return I18N::translateContext('son’s child', 'grandchild'); |
|
927 | + case 'sondau': |
|
928 | + return I18N::translateContext('son’s daughter', 'granddaughter'); |
|
929 | + case 'sonson': |
|
930 | + return I18N::translateContext('son’s son', 'grandson'); |
|
931 | + case 'sonwif': |
|
932 | + return I18N::translateContext('son’s wife', 'daughter-in-law'); |
|
933 | + case 'spobro': |
|
934 | + return I18N::translateContext('spouse’s brother', 'brother-in-law'); |
|
935 | + case 'spochi': |
|
936 | + return I18N::translateContext('spouse’s child', 'step-child'); |
|
937 | + case 'spodau': |
|
938 | + return I18N::translateContext('spouse’s daughter', 'step-daughter'); |
|
939 | + case 'spofat': |
|
940 | + return I18N::translateContext('spouse’s father', 'father-in-law'); |
|
941 | + case 'spomot': |
|
942 | + return I18N::translateContext('spouse’s mother', 'mother-in-law'); |
|
943 | + case 'sposis': |
|
944 | + return I18N::translateContext('spouse’s sister', 'sister-in-law'); |
|
945 | + case 'sposon': |
|
946 | + return I18N::translateContext('spouse’s son', 'step-son'); |
|
947 | + case 'spopar': |
|
948 | + return I18N::translateContext('spouse’s parent', 'mother/father-in-law'); |
|
949 | + case 'sposib': |
|
950 | + return I18N::translateContext('spouse’s sibling', 'brother/sister-in-law'); |
|
951 | + case 'wifbro': |
|
952 | + return I18N::translateContext('wife’s brother', 'brother-in-law'); |
|
953 | + case 'wifchi': |
|
954 | + return I18N::translateContext('wife’s child', 'step-child'); |
|
955 | + case 'wifdau': |
|
956 | + return I18N::translateContext('wife’s daughter', 'step-daughter'); |
|
957 | + case 'wiffat': |
|
958 | + return I18N::translateContext('wife’s father', 'father-in-law'); |
|
959 | + case 'wifmot': |
|
960 | + return I18N::translateContext('wife’s mother', 'mother-in-law'); |
|
961 | + case 'wifsib': |
|
962 | + return I18N::translateContext('wife’s sibling', 'brother/sister-in-law'); |
|
963 | + case 'wifsis': |
|
964 | + return I18N::translateContext('wife’s sister', 'sister-in-law'); |
|
965 | + case 'wifson': |
|
966 | + return I18N::translateContext('wife’s son', 'step-son'); |
|
967 | 967 | |
968 | - // Level Three relationships |
|
969 | - // I have commented out some of the unknown-sex relationships that are unlikely to to occur. |
|
970 | - // Feel free to add them in, if you think they might be needed |
|
971 | - case 'brochichi': |
|
972 | - if ($sex1 === 'M') { |
|
973 | - return I18N::translateContext('(a man’s) brother’s child’s child', 'great-nephew/niece'); |
|
974 | - } else { |
|
975 | - return I18N::translateContext('(a woman’s) brother’s child’s child', 'great-nephew/niece'); |
|
976 | - } |
|
977 | - case 'brochidau': |
|
978 | - if ($sex1 === 'M') { |
|
979 | - return I18N::translateContext('(a man’s) brother’s child’s daughter', 'great-niece'); |
|
980 | - } else { |
|
981 | - return I18N::translateContext('(a woman’s) brother’s child’s daughter', 'great-niece'); |
|
982 | - } |
|
983 | - case 'brochison': |
|
984 | - if ($sex1 === 'M') { |
|
985 | - return I18N::translateContext('(a man’s) brother’s child’s son', 'great-nephew'); |
|
986 | - } else { |
|
987 | - return I18N::translateContext('(a woman’s) brother’s child’s son', 'great-nephew'); |
|
988 | - } |
|
989 | - case 'brodauchi': |
|
990 | - if ($sex1 === 'M') { |
|
991 | - return I18N::translateContext('(a man’s) brother’s daughter’s child', 'great-nephew/niece'); |
|
992 | - } else { |
|
993 | - return I18N::translateContext('(a woman’s) brother’s daughter’s child', 'great-nephew/niece'); |
|
994 | - } |
|
995 | - case 'brodaudau': |
|
996 | - if ($sex1 === 'M') { |
|
997 | - return I18N::translateContext('(a man’s) brother’s daughter’s daughter', 'great-niece'); |
|
998 | - } else { |
|
999 | - return I18N::translateContext('(a woman’s) brother’s daughter’s daughter', 'great-niece'); |
|
1000 | - } |
|
1001 | - case 'brodauhus': |
|
1002 | - return I18N::translateContext('brother’s daughter’s husband', 'nephew-in-law'); |
|
1003 | - case 'brodauson': |
|
1004 | - if ($sex1 === 'M') { |
|
1005 | - return I18N::translateContext('(a man’s) brother’s daughter’s son', 'great-nephew'); |
|
1006 | - } else { |
|
1007 | - return I18N::translateContext('(a woman’s) brother’s daughter’s son', 'great-nephew'); |
|
1008 | - } |
|
1009 | - case 'brosonchi': |
|
1010 | - if ($sex1 === 'M') { |
|
1011 | - return I18N::translateContext('(a man’s) brother’s son’s child', 'great-nephew/niece'); |
|
1012 | - } else { |
|
1013 | - return I18N::translateContext('(a woman’s) brother’s son’s child', 'great-nephew/niece'); |
|
1014 | - } |
|
1015 | - case 'brosondau': |
|
1016 | - if ($sex1 === 'M') { |
|
1017 | - return I18N::translateContext('(a man’s) brother’s son’s daughter', 'great-niece'); |
|
1018 | - } else { |
|
1019 | - return I18N::translateContext('(a woman’s) brother’s son’s daughter', 'great-niece'); |
|
1020 | - } |
|
1021 | - case 'brosonson': |
|
1022 | - if ($sex1 === 'M') { |
|
1023 | - return I18N::translateContext('(a man’s) brother’s son’s son', 'great-nephew'); |
|
1024 | - } else { |
|
1025 | - return I18N::translateContext('(a woman’s) brother’s son’s son', 'great-nephew'); |
|
1026 | - } |
|
1027 | - case 'brosonwif': |
|
1028 | - return I18N::translateContext('brother’s son’s wife', 'niece-in-law'); |
|
1029 | - case 'browifbro': |
|
1030 | - return I18N::translateContext('brother’s wife’s brother', 'brother-in-law'); |
|
1031 | - case 'browifsib': |
|
1032 | - return I18N::translateContext('brother’s wife’s sibling', 'brother/sister-in-law'); |
|
1033 | - case 'browifsis': |
|
1034 | - return I18N::translateContext('brother’s wife’s sister', 'sister-in-law'); |
|
1035 | - case 'chichichi': |
|
1036 | - return I18N::translateContext('child’s child’s child', 'great-grandchild'); |
|
1037 | - case 'chichidau': |
|
1038 | - return I18N::translateContext('child’s child’s daughter', 'great-granddaughter'); |
|
1039 | - case 'chichison': |
|
1040 | - return I18N::translateContext('child’s child’s son', 'great-grandson'); |
|
1041 | - case 'chidauchi': |
|
1042 | - return I18N::translateContext('child’s daughter’s child', 'great-grandchild'); |
|
1043 | - case 'chidaudau': |
|
1044 | - return I18N::translateContext('child’s daughter’s daughter', 'great-granddaughter'); |
|
1045 | - case 'chidauhus': |
|
1046 | - return I18N::translateContext('child’s daughter’s husband', 'granddaughter’s husband'); |
|
1047 | - case 'chidauson': |
|
1048 | - return I18N::translateContext('child’s daughter’s son', 'great-grandson'); |
|
1049 | - case 'chisonchi': |
|
1050 | - return I18N::translateContext('child’s son’s child', 'great-grandchild'); |
|
1051 | - case 'chisondau': |
|
1052 | - return I18N::translateContext('child’s son’s daughter', 'great-granddaughter'); |
|
1053 | - case 'chisonson': |
|
1054 | - return I18N::translateContext('child’s son’s son', 'great-grandson'); |
|
1055 | - case 'chisonwif': |
|
1056 | - return I18N::translateContext('child’s son’s wife', 'grandson’s wife'); |
|
1057 | - case 'dauchichi': |
|
1058 | - return I18N::translateContext('daughter’s child’s child', 'great-grandchild'); |
|
1059 | - case 'dauchidau': |
|
1060 | - return I18N::translateContext('daughter’s child’s daughter', 'great-granddaughter'); |
|
1061 | - case 'dauchison': |
|
1062 | - return I18N::translateContext('daughter’s child’s son', 'great-grandson'); |
|
1063 | - case 'daudauchi': |
|
1064 | - return I18N::translateContext('daughter’s daughter’s child', 'great-grandchild'); |
|
1065 | - case 'daudaudau': |
|
1066 | - return I18N::translateContext('daughter’s daughter’s daughter', 'great-granddaughter'); |
|
1067 | - case 'daudauhus': |
|
1068 | - return I18N::translateContext('daughter’s daughter’s husband', 'granddaughter’s husband'); |
|
1069 | - case 'daudauson': |
|
1070 | - return I18N::translateContext('daughter’s daughter’s son', 'great-grandson'); |
|
1071 | - case 'dauhusfat': |
|
1072 | - return I18N::translateContext('daughter’s husband’s father', 'son-in-law’s father'); |
|
1073 | - case 'dauhusmot': |
|
1074 | - return I18N::translateContext('daughter’s husband’s mother', 'son-in-law’s mother'); |
|
1075 | - case 'dauhuspar': |
|
1076 | - return I18N::translateContext('daughter’s husband’s parent', 'son-in-law’s parent'); |
|
1077 | - case 'dausonchi': |
|
1078 | - return I18N::translateContext('daughter’s son’s child', 'great-grandchild'); |
|
1079 | - case 'dausondau': |
|
1080 | - return I18N::translateContext('daughter’s son’s daughter', 'great-granddaughter'); |
|
1081 | - case 'dausonson': |
|
1082 | - return I18N::translateContext('daughter’s son’s son', 'great-grandson'); |
|
1083 | - case 'dausonwif': |
|
1084 | - return I18N::translateContext('daughter’s son’s wife', 'grandson’s wife'); |
|
1085 | - case 'fatbrochi': |
|
1086 | - return I18N::translateContext('father’s brother’s child', 'first cousin'); |
|
1087 | - case 'fatbrodau': |
|
1088 | - return I18N::translateContext('father’s brother’s daughter', 'first cousin'); |
|
1089 | - case 'fatbroson': |
|
1090 | - return I18N::translateContext('father’s brother’s son', 'first cousin'); |
|
1091 | - case 'fatbrowif': |
|
1092 | - return I18N::translateContext('father’s brother’s wife', 'aunt'); |
|
1093 | - case 'fatfatbro': |
|
1094 | - return I18N::translateContext('father’s father’s brother', 'great-uncle'); |
|
1095 | - case 'fatfatfat': |
|
1096 | - return I18N::translateContext('father’s father’s father', 'great-grandfather'); |
|
1097 | - case 'fatfatmot': |
|
1098 | - return I18N::translateContext('father’s father’s mother', 'great-grandmother'); |
|
1099 | - case 'fatfatpar': |
|
1100 | - return I18N::translateContext('father’s father’s parent', 'great-grandparent'); |
|
1101 | - case 'fatfatsib': |
|
1102 | - return I18N::translateContext('father’s father’s sibling', 'great-aunt/uncle'); |
|
1103 | - case 'fatfatsis': |
|
1104 | - return I18N::translateContext('father’s father’s sister', 'great-aunt'); |
|
1105 | - case 'fatmotbro': |
|
1106 | - return I18N::translateContext('father’s mother’s brother', 'great-uncle'); |
|
1107 | - case 'fatmotfat': |
|
1108 | - return I18N::translateContext('father’s mother’s father', 'great-grandfather'); |
|
1109 | - case 'fatmotmot': |
|
1110 | - return I18N::translateContext('father’s mother’s mother', 'great-grandmother'); |
|
1111 | - case 'fatmotpar': |
|
1112 | - return I18N::translateContext('father’s mother’s parent', 'great-grandparent'); |
|
1113 | - case 'fatmotsib': |
|
1114 | - return I18N::translateContext('father’s mother’s sibling', 'great-aunt/uncle'); |
|
1115 | - case 'fatmotsis': |
|
1116 | - return I18N::translateContext('father’s mother’s sister', 'great-aunt'); |
|
1117 | - case 'fatparbro': |
|
1118 | - return I18N::translateContext('father’s parent’s brother', 'great-uncle'); |
|
1119 | - case 'fatparfat': |
|
1120 | - return I18N::translateContext('father’s parent’s father', 'great-grandfather'); |
|
1121 | - case 'fatparmot': |
|
1122 | - return I18N::translateContext('father’s parent’s mother', 'great-grandmother'); |
|
1123 | - case 'fatparpar': |
|
1124 | - return I18N::translateContext('father’s parent’s parent', 'great-grandparent'); |
|
1125 | - case 'fatparsib': |
|
1126 | - return I18N::translateContext('father’s parent’s sibling', 'great-aunt/uncle'); |
|
1127 | - case 'fatparsis': |
|
1128 | - return I18N::translateContext('father’s parent’s sister', 'great-aunt'); |
|
1129 | - case 'fatsischi': |
|
1130 | - return I18N::translateContext('father’s sister’s child', 'first cousin'); |
|
1131 | - case 'fatsisdau': |
|
1132 | - return I18N::translateContext('father’s sister’s daughter', 'first cousin'); |
|
1133 | - case 'fatsishus': |
|
1134 | - return I18N::translateContext('father’s sister’s husband', 'uncle'); |
|
1135 | - case 'fatsisson': |
|
1136 | - return I18N::translateContext('father’s sister’s son', 'first cousin'); |
|
1137 | - case 'fatwifchi': |
|
1138 | - return I18N::translateContext('father’s wife’s child', 'step-sibling'); |
|
1139 | - case 'fatwifdau': |
|
1140 | - return I18N::translateContext('father’s wife’s daughter', 'step-sister'); |
|
1141 | - case 'fatwifson': |
|
1142 | - return I18N::translateContext('father’s wife’s son', 'step-brother'); |
|
1143 | - case 'husbrowif': |
|
1144 | - return I18N::translateContext('husband’s brother’s wife', 'sister-in-law'); |
|
1145 | - case 'hussishus': |
|
1146 | - return I18N::translateContext('husband’s sister’s husband', 'brother-in-law'); |
|
1147 | - case 'motbrochi': |
|
1148 | - return I18N::translateContext('mother’s brother’s child', 'first cousin'); |
|
1149 | - case 'motbrodau': |
|
1150 | - return I18N::translateContext('mother’s brother’s daughter', 'first cousin'); |
|
1151 | - case 'motbroson': |
|
1152 | - return I18N::translateContext('mother’s brother’s son', 'first cousin'); |
|
1153 | - case 'motbrowif': |
|
1154 | - return I18N::translateContext('mother’s brother’s wife', 'aunt'); |
|
1155 | - case 'motfatbro': |
|
1156 | - return I18N::translateContext('mother’s father’s brother', 'great-uncle'); |
|
1157 | - case 'motfatfat': |
|
1158 | - return I18N::translateContext('mother’s father’s father', 'great-grandfather'); |
|
1159 | - case 'motfatmot': |
|
1160 | - return I18N::translateContext('mother’s father’s mother', 'great-grandmother'); |
|
1161 | - case 'motfatpar': |
|
1162 | - return I18N::translateContext('mother’s father’s parent', 'great-grandparent'); |
|
1163 | - case 'motfatsib': |
|
1164 | - return I18N::translateContext('mother’s father’s sibling', 'great-aunt/uncle'); |
|
1165 | - case 'motfatsis': |
|
1166 | - return I18N::translateContext('mother’s father’s sister', 'great-aunt'); |
|
1167 | - case 'mothuschi': |
|
1168 | - return I18N::translateContext('mother’s husband’s child', 'step-sibling'); |
|
1169 | - case 'mothusdau': |
|
1170 | - return I18N::translateContext('mother’s husband’s daughter', 'step-sister'); |
|
1171 | - case 'mothusson': |
|
1172 | - return I18N::translateContext('mother’s husband’s son', 'step-brother'); |
|
1173 | - case 'motmotbro': |
|
1174 | - return I18N::translateContext('mother’s mother’s brother', 'great-uncle'); |
|
1175 | - case 'motmotfat': |
|
1176 | - return I18N::translateContext('mother’s mother’s father', 'great-grandfather'); |
|
1177 | - case 'motmotmot': |
|
1178 | - return I18N::translateContext('mother’s mother’s mother', 'great-grandmother'); |
|
1179 | - case 'motmotpar': |
|
1180 | - return I18N::translateContext('mother’s mother’s parent', 'great-grandparent'); |
|
1181 | - case 'motmotsib': |
|
1182 | - return I18N::translateContext('mother’s mother’s sibling', 'great-aunt/uncle'); |
|
1183 | - case 'motmotsis': |
|
1184 | - return I18N::translateContext('mother’s mother’s sister', 'great-aunt'); |
|
1185 | - case 'motparbro': |
|
1186 | - return I18N::translateContext('mother’s parent’s brother', 'great-uncle'); |
|
1187 | - case 'motparfat': |
|
1188 | - return I18N::translateContext('mother’s parent’s father', 'great-grandfather'); |
|
1189 | - case 'motparmot': |
|
1190 | - return I18N::translateContext('mother’s parent’s mother', 'great-grandmother'); |
|
1191 | - case 'motparpar': |
|
1192 | - return I18N::translateContext('mother’s parent’s parent', 'great-grandparent'); |
|
1193 | - case 'motparsib': |
|
1194 | - return I18N::translateContext('mother’s parent’s sibling', 'great-aunt/uncle'); |
|
1195 | - case 'motparsis': |
|
1196 | - return I18N::translateContext('mother’s parent’s sister', 'great-aunt'); |
|
1197 | - case 'motsischi': |
|
1198 | - return I18N::translateContext('mother’s sister’s child', 'first cousin'); |
|
1199 | - case 'motsisdau': |
|
1200 | - return I18N::translateContext('mother’s sister’s daughter', 'first cousin'); |
|
1201 | - case 'motsishus': |
|
1202 | - return I18N::translateContext('mother’s sister’s husband', 'uncle'); |
|
1203 | - case 'motsisson': |
|
1204 | - return I18N::translateContext('mother’s sister’s son', 'first cousin'); |
|
1205 | - case 'parbrowif': |
|
1206 | - return I18N::translateContext('parent’s brother’s wife', 'aunt'); |
|
1207 | - case 'parfatbro': |
|
1208 | - return I18N::translateContext('parent’s father’s brother', 'great-uncle'); |
|
1209 | - case 'parfatfat': |
|
1210 | - return I18N::translateContext('parent’s father’s father', 'great-grandfather'); |
|
1211 | - case 'parfatmot': |
|
1212 | - return I18N::translateContext('parent’s father’s mother', 'great-grandmother'); |
|
1213 | - case 'parfatpar': |
|
1214 | - return I18N::translateContext('parent’s father’s parent', 'great-grandparent'); |
|
1215 | - case 'parfatsib': |
|
1216 | - return I18N::translateContext('parent’s father’s sibling', 'great-aunt/uncle'); |
|
1217 | - case 'parfatsis': |
|
1218 | - return I18N::translateContext('parent’s father’s sister', 'great-aunt'); |
|
1219 | - case 'parmotbro': |
|
1220 | - return I18N::translateContext('parent’s mother’s brother', 'great-uncle'); |
|
1221 | - case 'parmotfat': |
|
1222 | - return I18N::translateContext('parent’s mother’s father', 'great-grandfather'); |
|
1223 | - case 'parmotmot': |
|
1224 | - return I18N::translateContext('parent’s mother’s mother', 'great-grandmother'); |
|
1225 | - case 'parmotpar': |
|
1226 | - return I18N::translateContext('parent’s mother’s parent', 'great-grandparent'); |
|
1227 | - case 'parmotsib': |
|
1228 | - return I18N::translateContext('parent’s mother’s sibling', 'great-aunt/uncle'); |
|
1229 | - case 'parmotsis': |
|
1230 | - return I18N::translateContext('parent’s mother’s sister', 'great-aunt'); |
|
1231 | - case 'parparbro': |
|
1232 | - return I18N::translateContext('parent’s parent’s brother', 'great-uncle'); |
|
1233 | - case 'parparfat': |
|
1234 | - return I18N::translateContext('parent’s parent’s father', 'great-grandfather'); |
|
1235 | - case 'parparmot': |
|
1236 | - return I18N::translateContext('parent’s parent’s mother', 'great-grandmother'); |
|
1237 | - case 'parparpar': |
|
1238 | - return I18N::translateContext('parent’s parent’s parent', 'great-grandparent'); |
|
1239 | - case 'parparsib': |
|
1240 | - return I18N::translateContext('parent’s parent’s sibling', 'great-aunt/uncle'); |
|
1241 | - case 'parparsis': |
|
1242 | - return I18N::translateContext('parent’s parent’s sister', 'great-aunt'); |
|
1243 | - case 'parsishus': |
|
1244 | - return I18N::translateContext('parent’s sister’s husband', 'uncle'); |
|
1245 | - case 'parspochi': |
|
1246 | - return I18N::translateContext('parent’s spouse’s child', 'step-sibling'); |
|
1247 | - case 'parspodau': |
|
1248 | - return I18N::translateContext('parent’s spouse’s daughter', 'step-sister'); |
|
1249 | - case 'parsposon': |
|
1250 | - return I18N::translateContext('parent’s spouse’s son', 'step-brother'); |
|
1251 | - case 'sibchichi': |
|
1252 | - return I18N::translateContext('sibling’s child’s child', 'great-nephew/niece'); |
|
1253 | - case 'sibchidau': |
|
1254 | - return I18N::translateContext('sibling’s child’s daughter', 'great-niece'); |
|
1255 | - case 'sibchison': |
|
1256 | - return I18N::translateContext('sibling’s child’s son', 'great-nephew'); |
|
1257 | - case 'sibdauchi': |
|
1258 | - return I18N::translateContext('sibling’s daughter’s child', 'great-nephew/niece'); |
|
1259 | - case 'sibdaudau': |
|
1260 | - return I18N::translateContext('sibling’s daughter’s daughter', 'great-niece'); |
|
1261 | - case 'sibdauhus': |
|
1262 | - return I18N::translateContext('sibling’s daughter’s husband', 'nephew-in-law'); |
|
1263 | - case 'sibdauson': |
|
1264 | - return I18N::translateContext('sibling’s daughter’s son', 'great-nephew'); |
|
1265 | - case 'sibsonchi': |
|
1266 | - return I18N::translateContext('sibling’s son’s child', 'great-nephew/niece'); |
|
1267 | - case 'sibsondau': |
|
1268 | - return I18N::translateContext('sibling’s son’s daughter', 'great-niece'); |
|
1269 | - case 'sibsonson': |
|
1270 | - return I18N::translateContext('sibling’s son’s son', 'great-nephew'); |
|
1271 | - case 'sibsonwif': |
|
1272 | - return I18N::translateContext('sibling’s son’s wife', 'niece-in-law'); |
|
1273 | - case 'sischichi': |
|
1274 | - if ($sex1 === 'M') { |
|
1275 | - return I18N::translateContext('(a man’s) sister’s child’s child', 'great-nephew/niece'); |
|
1276 | - } else { |
|
1277 | - return I18N::translateContext('(a woman’s) sister’s child’s child', 'great-nephew/niece'); |
|
1278 | - } |
|
1279 | - case 'sischidau': |
|
1280 | - if ($sex1 === 'M') { |
|
1281 | - return I18N::translateContext('(a man’s) sister’s child’s daughter', 'great-niece'); |
|
1282 | - } else { |
|
1283 | - return I18N::translateContext('(a woman’s) sister’s child’s daughter', 'great-niece'); |
|
1284 | - } |
|
1285 | - case 'sischison': |
|
1286 | - if ($sex1 === 'M') { |
|
1287 | - return I18N::translateContext('(a man’s) sister’s child’s son', 'great-nephew'); |
|
1288 | - } else { |
|
1289 | - return I18N::translateContext('(a woman’s) sister’s child’s son', 'great-nephew'); |
|
1290 | - } |
|
1291 | - case 'sisdauchi': |
|
1292 | - if ($sex1 === 'M') { |
|
1293 | - return I18N::translateContext('(a man’s) sister’s daughter’s child', 'great-nephew/niece'); |
|
1294 | - } else { |
|
1295 | - return I18N::translateContext('(a woman’s) sister’s daughter’s child', 'great-nephew/niece'); |
|
1296 | - } |
|
1297 | - case 'sisdaudau': |
|
1298 | - if ($sex1 === 'M') { |
|
1299 | - return I18N::translateContext('(a man’s) sister’s daughter’s daughter', 'great-niece'); |
|
1300 | - } else { |
|
1301 | - return I18N::translateContext('(a woman’s) sister’s daughter’s daughter', 'great-niece'); |
|
1302 | - } |
|
1303 | - case 'sisdauhus': |
|
1304 | - return I18N::translateContext('sisters’s daughter’s husband', 'nephew-in-law'); |
|
1305 | - case 'sisdauson': |
|
1306 | - if ($sex1 === 'M') { |
|
1307 | - return I18N::translateContext('(a man’s) sister’s daughter’s son', 'great-nephew'); |
|
1308 | - } else { |
|
1309 | - return I18N::translateContext('(a woman’s) sister’s daughter’s son', 'great-nephew'); |
|
1310 | - } |
|
1311 | - case 'sishusbro': |
|
1312 | - return I18N::translateContext('sister’s husband’s brother', 'brother-in-law'); |
|
1313 | - case 'sishussib': |
|
1314 | - return I18N::translateContext('sister’s husband’s sibling', 'brother/sister-in-law'); |
|
1315 | - case 'sishussis': |
|
1316 | - return I18N::translateContext('sister’s husband’s sister', 'sister-in-law'); |
|
1317 | - case 'sissonchi': |
|
1318 | - if ($sex1 === 'M') { |
|
1319 | - return I18N::translateContext('(a man’s) sister’s son’s child', 'great-nephew/niece'); |
|
1320 | - } else { |
|
1321 | - return I18N::translateContext('(a woman’s) sister’s son’s child', 'great-nephew/niece'); |
|
1322 | - } |
|
1323 | - case 'sissondau': |
|
1324 | - if ($sex1 === 'M') { |
|
1325 | - return I18N::translateContext('(a man’s) sister’s son’s daughter', 'great-niece'); |
|
1326 | - } else { |
|
1327 | - return I18N::translateContext('(a woman’s) sister’s son’s daughter', 'great-niece'); |
|
1328 | - } |
|
1329 | - case 'sissonson': |
|
1330 | - if ($sex1 === 'M') { |
|
1331 | - return I18N::translateContext('(a man’s) sister’s son’s son', 'great-nephew'); |
|
1332 | - } else { |
|
1333 | - return I18N::translateContext('(a woman’s) sister’s son’s son', 'great-nephew'); |
|
1334 | - } |
|
1335 | - case 'sissonwif': |
|
1336 | - return I18N::translateContext('sisters’s son’s wife', 'niece-in-law'); |
|
1337 | - case 'sonchichi': |
|
1338 | - return I18N::translateContext('son’s child’s child', 'great-grandchild'); |
|
1339 | - case 'sonchidau': |
|
1340 | - return I18N::translateContext('son’s child’s daughter', 'great-granddaughter'); |
|
1341 | - case 'sonchison': |
|
1342 | - return I18N::translateContext('son’s child’s son', 'great-grandson'); |
|
1343 | - case 'sondauchi': |
|
1344 | - return I18N::translateContext('son’s daughter’s child', 'great-grandchild'); |
|
1345 | - case 'sondaudau': |
|
1346 | - return I18N::translateContext('son’s daughter’s daughter', 'great-granddaughter'); |
|
1347 | - case 'sondauhus': |
|
1348 | - return I18N::translateContext('son’s daughter’s husband', 'granddaughter’s husband'); |
|
1349 | - case 'sondauson': |
|
1350 | - return I18N::translateContext('son’s daughter’s son', 'great-grandson'); |
|
1351 | - case 'sonsonchi': |
|
1352 | - return I18N::translateContext('son’s son’s child', 'great-grandchild'); |
|
1353 | - case 'sonsondau': |
|
1354 | - return I18N::translateContext('son’s son’s daughter', 'great-granddaughter'); |
|
1355 | - case 'sonsonson': |
|
1356 | - return I18N::translateContext('son’s son’s son', 'great-grandson'); |
|
1357 | - case 'sonsonwif': |
|
1358 | - return I18N::translateContext('son’s son’s wife', 'grandson’s wife'); |
|
1359 | - case 'sonwiffat': |
|
1360 | - return I18N::translateContext('son’s wife’s father', 'daughter-in-law’s father'); |
|
1361 | - case 'sonwifmot': |
|
1362 | - return I18N::translateContext('son’s wife’s mother', 'daughter-in-law’s mother'); |
|
1363 | - case 'sonwifpar': |
|
1364 | - return I18N::translateContext('son’s wife’s parent', 'daughter-in-law’s parent'); |
|
1365 | - case 'wifbrowif': |
|
1366 | - return I18N::translateContext('wife’s brother’s wife', 'sister-in-law'); |
|
1367 | - case 'wifsishus': |
|
1368 | - return I18N::translateContext('wife’s sister’s husband', 'brother-in-law'); |
|
968 | + // Level Three relationships |
|
969 | + // I have commented out some of the unknown-sex relationships that are unlikely to to occur. |
|
970 | + // Feel free to add them in, if you think they might be needed |
|
971 | + case 'brochichi': |
|
972 | + if ($sex1 === 'M') { |
|
973 | + return I18N::translateContext('(a man’s) brother’s child’s child', 'great-nephew/niece'); |
|
974 | + } else { |
|
975 | + return I18N::translateContext('(a woman’s) brother’s child’s child', 'great-nephew/niece'); |
|
976 | + } |
|
977 | + case 'brochidau': |
|
978 | + if ($sex1 === 'M') { |
|
979 | + return I18N::translateContext('(a man’s) brother’s child’s daughter', 'great-niece'); |
|
980 | + } else { |
|
981 | + return I18N::translateContext('(a woman’s) brother’s child’s daughter', 'great-niece'); |
|
982 | + } |
|
983 | + case 'brochison': |
|
984 | + if ($sex1 === 'M') { |
|
985 | + return I18N::translateContext('(a man’s) brother’s child’s son', 'great-nephew'); |
|
986 | + } else { |
|
987 | + return I18N::translateContext('(a woman’s) brother’s child’s son', 'great-nephew'); |
|
988 | + } |
|
989 | + case 'brodauchi': |
|
990 | + if ($sex1 === 'M') { |
|
991 | + return I18N::translateContext('(a man’s) brother’s daughter’s child', 'great-nephew/niece'); |
|
992 | + } else { |
|
993 | + return I18N::translateContext('(a woman’s) brother’s daughter’s child', 'great-nephew/niece'); |
|
994 | + } |
|
995 | + case 'brodaudau': |
|
996 | + if ($sex1 === 'M') { |
|
997 | + return I18N::translateContext('(a man’s) brother’s daughter’s daughter', 'great-niece'); |
|
998 | + } else { |
|
999 | + return I18N::translateContext('(a woman’s) brother’s daughter’s daughter', 'great-niece'); |
|
1000 | + } |
|
1001 | + case 'brodauhus': |
|
1002 | + return I18N::translateContext('brother’s daughter’s husband', 'nephew-in-law'); |
|
1003 | + case 'brodauson': |
|
1004 | + if ($sex1 === 'M') { |
|
1005 | + return I18N::translateContext('(a man’s) brother’s daughter’s son', 'great-nephew'); |
|
1006 | + } else { |
|
1007 | + return I18N::translateContext('(a woman’s) brother’s daughter’s son', 'great-nephew'); |
|
1008 | + } |
|
1009 | + case 'brosonchi': |
|
1010 | + if ($sex1 === 'M') { |
|
1011 | + return I18N::translateContext('(a man’s) brother’s son’s child', 'great-nephew/niece'); |
|
1012 | + } else { |
|
1013 | + return I18N::translateContext('(a woman’s) brother’s son’s child', 'great-nephew/niece'); |
|
1014 | + } |
|
1015 | + case 'brosondau': |
|
1016 | + if ($sex1 === 'M') { |
|
1017 | + return I18N::translateContext('(a man’s) brother’s son’s daughter', 'great-niece'); |
|
1018 | + } else { |
|
1019 | + return I18N::translateContext('(a woman’s) brother’s son’s daughter', 'great-niece'); |
|
1020 | + } |
|
1021 | + case 'brosonson': |
|
1022 | + if ($sex1 === 'M') { |
|
1023 | + return I18N::translateContext('(a man’s) brother’s son’s son', 'great-nephew'); |
|
1024 | + } else { |
|
1025 | + return I18N::translateContext('(a woman’s) brother’s son’s son', 'great-nephew'); |
|
1026 | + } |
|
1027 | + case 'brosonwif': |
|
1028 | + return I18N::translateContext('brother’s son’s wife', 'niece-in-law'); |
|
1029 | + case 'browifbro': |
|
1030 | + return I18N::translateContext('brother’s wife’s brother', 'brother-in-law'); |
|
1031 | + case 'browifsib': |
|
1032 | + return I18N::translateContext('brother’s wife’s sibling', 'brother/sister-in-law'); |
|
1033 | + case 'browifsis': |
|
1034 | + return I18N::translateContext('brother’s wife’s sister', 'sister-in-law'); |
|
1035 | + case 'chichichi': |
|
1036 | + return I18N::translateContext('child’s child’s child', 'great-grandchild'); |
|
1037 | + case 'chichidau': |
|
1038 | + return I18N::translateContext('child’s child’s daughter', 'great-granddaughter'); |
|
1039 | + case 'chichison': |
|
1040 | + return I18N::translateContext('child’s child’s son', 'great-grandson'); |
|
1041 | + case 'chidauchi': |
|
1042 | + return I18N::translateContext('child’s daughter’s child', 'great-grandchild'); |
|
1043 | + case 'chidaudau': |
|
1044 | + return I18N::translateContext('child’s daughter’s daughter', 'great-granddaughter'); |
|
1045 | + case 'chidauhus': |
|
1046 | + return I18N::translateContext('child’s daughter’s husband', 'granddaughter’s husband'); |
|
1047 | + case 'chidauson': |
|
1048 | + return I18N::translateContext('child’s daughter’s son', 'great-grandson'); |
|
1049 | + case 'chisonchi': |
|
1050 | + return I18N::translateContext('child’s son’s child', 'great-grandchild'); |
|
1051 | + case 'chisondau': |
|
1052 | + return I18N::translateContext('child’s son’s daughter', 'great-granddaughter'); |
|
1053 | + case 'chisonson': |
|
1054 | + return I18N::translateContext('child’s son’s son', 'great-grandson'); |
|
1055 | + case 'chisonwif': |
|
1056 | + return I18N::translateContext('child’s son’s wife', 'grandson’s wife'); |
|
1057 | + case 'dauchichi': |
|
1058 | + return I18N::translateContext('daughter’s child’s child', 'great-grandchild'); |
|
1059 | + case 'dauchidau': |
|
1060 | + return I18N::translateContext('daughter’s child’s daughter', 'great-granddaughter'); |
|
1061 | + case 'dauchison': |
|
1062 | + return I18N::translateContext('daughter’s child’s son', 'great-grandson'); |
|
1063 | + case 'daudauchi': |
|
1064 | + return I18N::translateContext('daughter’s daughter’s child', 'great-grandchild'); |
|
1065 | + case 'daudaudau': |
|
1066 | + return I18N::translateContext('daughter’s daughter’s daughter', 'great-granddaughter'); |
|
1067 | + case 'daudauhus': |
|
1068 | + return I18N::translateContext('daughter’s daughter’s husband', 'granddaughter’s husband'); |
|
1069 | + case 'daudauson': |
|
1070 | + return I18N::translateContext('daughter’s daughter’s son', 'great-grandson'); |
|
1071 | + case 'dauhusfat': |
|
1072 | + return I18N::translateContext('daughter’s husband’s father', 'son-in-law’s father'); |
|
1073 | + case 'dauhusmot': |
|
1074 | + return I18N::translateContext('daughter’s husband’s mother', 'son-in-law’s mother'); |
|
1075 | + case 'dauhuspar': |
|
1076 | + return I18N::translateContext('daughter’s husband’s parent', 'son-in-law’s parent'); |
|
1077 | + case 'dausonchi': |
|
1078 | + return I18N::translateContext('daughter’s son’s child', 'great-grandchild'); |
|
1079 | + case 'dausondau': |
|
1080 | + return I18N::translateContext('daughter’s son’s daughter', 'great-granddaughter'); |
|
1081 | + case 'dausonson': |
|
1082 | + return I18N::translateContext('daughter’s son’s son', 'great-grandson'); |
|
1083 | + case 'dausonwif': |
|
1084 | + return I18N::translateContext('daughter’s son’s wife', 'grandson’s wife'); |
|
1085 | + case 'fatbrochi': |
|
1086 | + return I18N::translateContext('father’s brother’s child', 'first cousin'); |
|
1087 | + case 'fatbrodau': |
|
1088 | + return I18N::translateContext('father’s brother’s daughter', 'first cousin'); |
|
1089 | + case 'fatbroson': |
|
1090 | + return I18N::translateContext('father’s brother’s son', 'first cousin'); |
|
1091 | + case 'fatbrowif': |
|
1092 | + return I18N::translateContext('father’s brother’s wife', 'aunt'); |
|
1093 | + case 'fatfatbro': |
|
1094 | + return I18N::translateContext('father’s father’s brother', 'great-uncle'); |
|
1095 | + case 'fatfatfat': |
|
1096 | + return I18N::translateContext('father’s father’s father', 'great-grandfather'); |
|
1097 | + case 'fatfatmot': |
|
1098 | + return I18N::translateContext('father’s father’s mother', 'great-grandmother'); |
|
1099 | + case 'fatfatpar': |
|
1100 | + return I18N::translateContext('father’s father’s parent', 'great-grandparent'); |
|
1101 | + case 'fatfatsib': |
|
1102 | + return I18N::translateContext('father’s father’s sibling', 'great-aunt/uncle'); |
|
1103 | + case 'fatfatsis': |
|
1104 | + return I18N::translateContext('father’s father’s sister', 'great-aunt'); |
|
1105 | + case 'fatmotbro': |
|
1106 | + return I18N::translateContext('father’s mother’s brother', 'great-uncle'); |
|
1107 | + case 'fatmotfat': |
|
1108 | + return I18N::translateContext('father’s mother’s father', 'great-grandfather'); |
|
1109 | + case 'fatmotmot': |
|
1110 | + return I18N::translateContext('father’s mother’s mother', 'great-grandmother'); |
|
1111 | + case 'fatmotpar': |
|
1112 | + return I18N::translateContext('father’s mother’s parent', 'great-grandparent'); |
|
1113 | + case 'fatmotsib': |
|
1114 | + return I18N::translateContext('father’s mother’s sibling', 'great-aunt/uncle'); |
|
1115 | + case 'fatmotsis': |
|
1116 | + return I18N::translateContext('father’s mother’s sister', 'great-aunt'); |
|
1117 | + case 'fatparbro': |
|
1118 | + return I18N::translateContext('father’s parent’s brother', 'great-uncle'); |
|
1119 | + case 'fatparfat': |
|
1120 | + return I18N::translateContext('father’s parent’s father', 'great-grandfather'); |
|
1121 | + case 'fatparmot': |
|
1122 | + return I18N::translateContext('father’s parent’s mother', 'great-grandmother'); |
|
1123 | + case 'fatparpar': |
|
1124 | + return I18N::translateContext('father’s parent’s parent', 'great-grandparent'); |
|
1125 | + case 'fatparsib': |
|
1126 | + return I18N::translateContext('father’s parent’s sibling', 'great-aunt/uncle'); |
|
1127 | + case 'fatparsis': |
|
1128 | + return I18N::translateContext('father’s parent’s sister', 'great-aunt'); |
|
1129 | + case 'fatsischi': |
|
1130 | + return I18N::translateContext('father’s sister’s child', 'first cousin'); |
|
1131 | + case 'fatsisdau': |
|
1132 | + return I18N::translateContext('father’s sister’s daughter', 'first cousin'); |
|
1133 | + case 'fatsishus': |
|
1134 | + return I18N::translateContext('father’s sister’s husband', 'uncle'); |
|
1135 | + case 'fatsisson': |
|
1136 | + return I18N::translateContext('father’s sister’s son', 'first cousin'); |
|
1137 | + case 'fatwifchi': |
|
1138 | + return I18N::translateContext('father’s wife’s child', 'step-sibling'); |
|
1139 | + case 'fatwifdau': |
|
1140 | + return I18N::translateContext('father’s wife’s daughter', 'step-sister'); |
|
1141 | + case 'fatwifson': |
|
1142 | + return I18N::translateContext('father’s wife’s son', 'step-brother'); |
|
1143 | + case 'husbrowif': |
|
1144 | + return I18N::translateContext('husband’s brother’s wife', 'sister-in-law'); |
|
1145 | + case 'hussishus': |
|
1146 | + return I18N::translateContext('husband’s sister’s husband', 'brother-in-law'); |
|
1147 | + case 'motbrochi': |
|
1148 | + return I18N::translateContext('mother’s brother’s child', 'first cousin'); |
|
1149 | + case 'motbrodau': |
|
1150 | + return I18N::translateContext('mother’s brother’s daughter', 'first cousin'); |
|
1151 | + case 'motbroson': |
|
1152 | + return I18N::translateContext('mother’s brother’s son', 'first cousin'); |
|
1153 | + case 'motbrowif': |
|
1154 | + return I18N::translateContext('mother’s brother’s wife', 'aunt'); |
|
1155 | + case 'motfatbro': |
|
1156 | + return I18N::translateContext('mother’s father’s brother', 'great-uncle'); |
|
1157 | + case 'motfatfat': |
|
1158 | + return I18N::translateContext('mother’s father’s father', 'great-grandfather'); |
|
1159 | + case 'motfatmot': |
|
1160 | + return I18N::translateContext('mother’s father’s mother', 'great-grandmother'); |
|
1161 | + case 'motfatpar': |
|
1162 | + return I18N::translateContext('mother’s father’s parent', 'great-grandparent'); |
|
1163 | + case 'motfatsib': |
|
1164 | + return I18N::translateContext('mother’s father’s sibling', 'great-aunt/uncle'); |
|
1165 | + case 'motfatsis': |
|
1166 | + return I18N::translateContext('mother’s father’s sister', 'great-aunt'); |
|
1167 | + case 'mothuschi': |
|
1168 | + return I18N::translateContext('mother’s husband’s child', 'step-sibling'); |
|
1169 | + case 'mothusdau': |
|
1170 | + return I18N::translateContext('mother’s husband’s daughter', 'step-sister'); |
|
1171 | + case 'mothusson': |
|
1172 | + return I18N::translateContext('mother’s husband’s son', 'step-brother'); |
|
1173 | + case 'motmotbro': |
|
1174 | + return I18N::translateContext('mother’s mother’s brother', 'great-uncle'); |
|
1175 | + case 'motmotfat': |
|
1176 | + return I18N::translateContext('mother’s mother’s father', 'great-grandfather'); |
|
1177 | + case 'motmotmot': |
|
1178 | + return I18N::translateContext('mother’s mother’s mother', 'great-grandmother'); |
|
1179 | + case 'motmotpar': |
|
1180 | + return I18N::translateContext('mother’s mother’s parent', 'great-grandparent'); |
|
1181 | + case 'motmotsib': |
|
1182 | + return I18N::translateContext('mother’s mother’s sibling', 'great-aunt/uncle'); |
|
1183 | + case 'motmotsis': |
|
1184 | + return I18N::translateContext('mother’s mother’s sister', 'great-aunt'); |
|
1185 | + case 'motparbro': |
|
1186 | + return I18N::translateContext('mother’s parent’s brother', 'great-uncle'); |
|
1187 | + case 'motparfat': |
|
1188 | + return I18N::translateContext('mother’s parent’s father', 'great-grandfather'); |
|
1189 | + case 'motparmot': |
|
1190 | + return I18N::translateContext('mother’s parent’s mother', 'great-grandmother'); |
|
1191 | + case 'motparpar': |
|
1192 | + return I18N::translateContext('mother’s parent’s parent', 'great-grandparent'); |
|
1193 | + case 'motparsib': |
|
1194 | + return I18N::translateContext('mother’s parent’s sibling', 'great-aunt/uncle'); |
|
1195 | + case 'motparsis': |
|
1196 | + return I18N::translateContext('mother’s parent’s sister', 'great-aunt'); |
|
1197 | + case 'motsischi': |
|
1198 | + return I18N::translateContext('mother’s sister’s child', 'first cousin'); |
|
1199 | + case 'motsisdau': |
|
1200 | + return I18N::translateContext('mother’s sister’s daughter', 'first cousin'); |
|
1201 | + case 'motsishus': |
|
1202 | + return I18N::translateContext('mother’s sister’s husband', 'uncle'); |
|
1203 | + case 'motsisson': |
|
1204 | + return I18N::translateContext('mother’s sister’s son', 'first cousin'); |
|
1205 | + case 'parbrowif': |
|
1206 | + return I18N::translateContext('parent’s brother’s wife', 'aunt'); |
|
1207 | + case 'parfatbro': |
|
1208 | + return I18N::translateContext('parent’s father’s brother', 'great-uncle'); |
|
1209 | + case 'parfatfat': |
|
1210 | + return I18N::translateContext('parent’s father’s father', 'great-grandfather'); |
|
1211 | + case 'parfatmot': |
|
1212 | + return I18N::translateContext('parent’s father’s mother', 'great-grandmother'); |
|
1213 | + case 'parfatpar': |
|
1214 | + return I18N::translateContext('parent’s father’s parent', 'great-grandparent'); |
|
1215 | + case 'parfatsib': |
|
1216 | + return I18N::translateContext('parent’s father’s sibling', 'great-aunt/uncle'); |
|
1217 | + case 'parfatsis': |
|
1218 | + return I18N::translateContext('parent’s father’s sister', 'great-aunt'); |
|
1219 | + case 'parmotbro': |
|
1220 | + return I18N::translateContext('parent’s mother’s brother', 'great-uncle'); |
|
1221 | + case 'parmotfat': |
|
1222 | + return I18N::translateContext('parent’s mother’s father', 'great-grandfather'); |
|
1223 | + case 'parmotmot': |
|
1224 | + return I18N::translateContext('parent’s mother’s mother', 'great-grandmother'); |
|
1225 | + case 'parmotpar': |
|
1226 | + return I18N::translateContext('parent’s mother’s parent', 'great-grandparent'); |
|
1227 | + case 'parmotsib': |
|
1228 | + return I18N::translateContext('parent’s mother’s sibling', 'great-aunt/uncle'); |
|
1229 | + case 'parmotsis': |
|
1230 | + return I18N::translateContext('parent’s mother’s sister', 'great-aunt'); |
|
1231 | + case 'parparbro': |
|
1232 | + return I18N::translateContext('parent’s parent’s brother', 'great-uncle'); |
|
1233 | + case 'parparfat': |
|
1234 | + return I18N::translateContext('parent’s parent’s father', 'great-grandfather'); |
|
1235 | + case 'parparmot': |
|
1236 | + return I18N::translateContext('parent’s parent’s mother', 'great-grandmother'); |
|
1237 | + case 'parparpar': |
|
1238 | + return I18N::translateContext('parent’s parent’s parent', 'great-grandparent'); |
|
1239 | + case 'parparsib': |
|
1240 | + return I18N::translateContext('parent’s parent’s sibling', 'great-aunt/uncle'); |
|
1241 | + case 'parparsis': |
|
1242 | + return I18N::translateContext('parent’s parent’s sister', 'great-aunt'); |
|
1243 | + case 'parsishus': |
|
1244 | + return I18N::translateContext('parent’s sister’s husband', 'uncle'); |
|
1245 | + case 'parspochi': |
|
1246 | + return I18N::translateContext('parent’s spouse’s child', 'step-sibling'); |
|
1247 | + case 'parspodau': |
|
1248 | + return I18N::translateContext('parent’s spouse’s daughter', 'step-sister'); |
|
1249 | + case 'parsposon': |
|
1250 | + return I18N::translateContext('parent’s spouse’s son', 'step-brother'); |
|
1251 | + case 'sibchichi': |
|
1252 | + return I18N::translateContext('sibling’s child’s child', 'great-nephew/niece'); |
|
1253 | + case 'sibchidau': |
|
1254 | + return I18N::translateContext('sibling’s child’s daughter', 'great-niece'); |
|
1255 | + case 'sibchison': |
|
1256 | + return I18N::translateContext('sibling’s child’s son', 'great-nephew'); |
|
1257 | + case 'sibdauchi': |
|
1258 | + return I18N::translateContext('sibling’s daughter’s child', 'great-nephew/niece'); |
|
1259 | + case 'sibdaudau': |
|
1260 | + return I18N::translateContext('sibling’s daughter’s daughter', 'great-niece'); |
|
1261 | + case 'sibdauhus': |
|
1262 | + return I18N::translateContext('sibling’s daughter’s husband', 'nephew-in-law'); |
|
1263 | + case 'sibdauson': |
|
1264 | + return I18N::translateContext('sibling’s daughter’s son', 'great-nephew'); |
|
1265 | + case 'sibsonchi': |
|
1266 | + return I18N::translateContext('sibling’s son’s child', 'great-nephew/niece'); |
|
1267 | + case 'sibsondau': |
|
1268 | + return I18N::translateContext('sibling’s son’s daughter', 'great-niece'); |
|
1269 | + case 'sibsonson': |
|
1270 | + return I18N::translateContext('sibling’s son’s son', 'great-nephew'); |
|
1271 | + case 'sibsonwif': |
|
1272 | + return I18N::translateContext('sibling’s son’s wife', 'niece-in-law'); |
|
1273 | + case 'sischichi': |
|
1274 | + if ($sex1 === 'M') { |
|
1275 | + return I18N::translateContext('(a man’s) sister’s child’s child', 'great-nephew/niece'); |
|
1276 | + } else { |
|
1277 | + return I18N::translateContext('(a woman’s) sister’s child’s child', 'great-nephew/niece'); |
|
1278 | + } |
|
1279 | + case 'sischidau': |
|
1280 | + if ($sex1 === 'M') { |
|
1281 | + return I18N::translateContext('(a man’s) sister’s child’s daughter', 'great-niece'); |
|
1282 | + } else { |
|
1283 | + return I18N::translateContext('(a woman’s) sister’s child’s daughter', 'great-niece'); |
|
1284 | + } |
|
1285 | + case 'sischison': |
|
1286 | + if ($sex1 === 'M') { |
|
1287 | + return I18N::translateContext('(a man’s) sister’s child’s son', 'great-nephew'); |
|
1288 | + } else { |
|
1289 | + return I18N::translateContext('(a woman’s) sister’s child’s son', 'great-nephew'); |
|
1290 | + } |
|
1291 | + case 'sisdauchi': |
|
1292 | + if ($sex1 === 'M') { |
|
1293 | + return I18N::translateContext('(a man’s) sister’s daughter’s child', 'great-nephew/niece'); |
|
1294 | + } else { |
|
1295 | + return I18N::translateContext('(a woman’s) sister’s daughter’s child', 'great-nephew/niece'); |
|
1296 | + } |
|
1297 | + case 'sisdaudau': |
|
1298 | + if ($sex1 === 'M') { |
|
1299 | + return I18N::translateContext('(a man’s) sister’s daughter’s daughter', 'great-niece'); |
|
1300 | + } else { |
|
1301 | + return I18N::translateContext('(a woman’s) sister’s daughter’s daughter', 'great-niece'); |
|
1302 | + } |
|
1303 | + case 'sisdauhus': |
|
1304 | + return I18N::translateContext('sisters’s daughter’s husband', 'nephew-in-law'); |
|
1305 | + case 'sisdauson': |
|
1306 | + if ($sex1 === 'M') { |
|
1307 | + return I18N::translateContext('(a man’s) sister’s daughter’s son', 'great-nephew'); |
|
1308 | + } else { |
|
1309 | + return I18N::translateContext('(a woman’s) sister’s daughter’s son', 'great-nephew'); |
|
1310 | + } |
|
1311 | + case 'sishusbro': |
|
1312 | + return I18N::translateContext('sister’s husband’s brother', 'brother-in-law'); |
|
1313 | + case 'sishussib': |
|
1314 | + return I18N::translateContext('sister’s husband’s sibling', 'brother/sister-in-law'); |
|
1315 | + case 'sishussis': |
|
1316 | + return I18N::translateContext('sister’s husband’s sister', 'sister-in-law'); |
|
1317 | + case 'sissonchi': |
|
1318 | + if ($sex1 === 'M') { |
|
1319 | + return I18N::translateContext('(a man’s) sister’s son’s child', 'great-nephew/niece'); |
|
1320 | + } else { |
|
1321 | + return I18N::translateContext('(a woman’s) sister’s son’s child', 'great-nephew/niece'); |
|
1322 | + } |
|
1323 | + case 'sissondau': |
|
1324 | + if ($sex1 === 'M') { |
|
1325 | + return I18N::translateContext('(a man’s) sister’s son’s daughter', 'great-niece'); |
|
1326 | + } else { |
|
1327 | + return I18N::translateContext('(a woman’s) sister’s son’s daughter', 'great-niece'); |
|
1328 | + } |
|
1329 | + case 'sissonson': |
|
1330 | + if ($sex1 === 'M') { |
|
1331 | + return I18N::translateContext('(a man’s) sister’s son’s son', 'great-nephew'); |
|
1332 | + } else { |
|
1333 | + return I18N::translateContext('(a woman’s) sister’s son’s son', 'great-nephew'); |
|
1334 | + } |
|
1335 | + case 'sissonwif': |
|
1336 | + return I18N::translateContext('sisters’s son’s wife', 'niece-in-law'); |
|
1337 | + case 'sonchichi': |
|
1338 | + return I18N::translateContext('son’s child’s child', 'great-grandchild'); |
|
1339 | + case 'sonchidau': |
|
1340 | + return I18N::translateContext('son’s child’s daughter', 'great-granddaughter'); |
|
1341 | + case 'sonchison': |
|
1342 | + return I18N::translateContext('son’s child’s son', 'great-grandson'); |
|
1343 | + case 'sondauchi': |
|
1344 | + return I18N::translateContext('son’s daughter’s child', 'great-grandchild'); |
|
1345 | + case 'sondaudau': |
|
1346 | + return I18N::translateContext('son’s daughter’s daughter', 'great-granddaughter'); |
|
1347 | + case 'sondauhus': |
|
1348 | + return I18N::translateContext('son’s daughter’s husband', 'granddaughter’s husband'); |
|
1349 | + case 'sondauson': |
|
1350 | + return I18N::translateContext('son’s daughter’s son', 'great-grandson'); |
|
1351 | + case 'sonsonchi': |
|
1352 | + return I18N::translateContext('son’s son’s child', 'great-grandchild'); |
|
1353 | + case 'sonsondau': |
|
1354 | + return I18N::translateContext('son’s son’s daughter', 'great-granddaughter'); |
|
1355 | + case 'sonsonson': |
|
1356 | + return I18N::translateContext('son’s son’s son', 'great-grandson'); |
|
1357 | + case 'sonsonwif': |
|
1358 | + return I18N::translateContext('son’s son’s wife', 'grandson’s wife'); |
|
1359 | + case 'sonwiffat': |
|
1360 | + return I18N::translateContext('son’s wife’s father', 'daughter-in-law’s father'); |
|
1361 | + case 'sonwifmot': |
|
1362 | + return I18N::translateContext('son’s wife’s mother', 'daughter-in-law’s mother'); |
|
1363 | + case 'sonwifpar': |
|
1364 | + return I18N::translateContext('son’s wife’s parent', 'daughter-in-law’s parent'); |
|
1365 | + case 'wifbrowif': |
|
1366 | + return I18N::translateContext('wife’s brother’s wife', 'sister-in-law'); |
|
1367 | + case 'wifsishus': |
|
1368 | + return I18N::translateContext('wife’s sister’s husband', 'brother-in-law'); |
|
1369 | 1369 | |
1370 | - // Some “special case” level four relationships that have specific names in certain languages |
|
1371 | - case 'fatfatbrowif': |
|
1372 | - return I18N::translateContext('father’s father’s brother’s wife', 'great-aunt'); |
|
1373 | - case 'fatfatsibspo': |
|
1374 | - return I18N::translateContext('father’s father’s sibling’s spouse', 'great-aunt/uncle'); |
|
1375 | - case 'fatfatsishus': |
|
1376 | - return I18N::translateContext('father’s father’s sister’s husband', 'great-uncle'); |
|
1377 | - case 'fatmotbrowif': |
|
1378 | - return I18N::translateContext('father’s mother’s brother’s wife', 'great-aunt'); |
|
1379 | - case 'fatmotsibspo': |
|
1380 | - return I18N::translateContext('father’s mother’s sibling’s spouse', 'great-aunt/uncle'); |
|
1381 | - case 'fatmotsishus': |
|
1382 | - return I18N::translateContext('father’s mother’s sister’s husband', 'great-uncle'); |
|
1383 | - case 'fatparbrowif': |
|
1384 | - return I18N::translateContext('father’s parent’s brother’s wife', 'great-aunt'); |
|
1385 | - case 'fatparsibspo': |
|
1386 | - return I18N::translateContext('father’s parent’s sibling’s spouse', 'great-aunt/uncle'); |
|
1387 | - case 'fatparsishus': |
|
1388 | - return I18N::translateContext('father’s parent’s sister’s husband', 'great-uncle'); |
|
1389 | - case 'motfatbrowif': |
|
1390 | - return I18N::translateContext('mother’s father’s brother’s wife', 'great-aunt'); |
|
1391 | - case 'motfatsibspo': |
|
1392 | - return I18N::translateContext('mother’s father’s sibling’s spouse', 'great-aunt/uncle'); |
|
1393 | - case 'motfatsishus': |
|
1394 | - return I18N::translateContext('mother’s father’s sister’s husband', 'great-uncle'); |
|
1395 | - case 'motmotbrowif': |
|
1396 | - return I18N::translateContext('mother’s mother’s brother’s wife', 'great-aunt'); |
|
1397 | - case 'motmotsibspo': |
|
1398 | - return I18N::translateContext('mother’s mother’s sibling’s spouse', 'great-aunt/uncle'); |
|
1399 | - case 'motmotsishus': |
|
1400 | - return I18N::translateContext('mother’s mother’s sister’s husband', 'great-uncle'); |
|
1401 | - case 'motparbrowif': |
|
1402 | - return I18N::translateContext('mother’s parent’s brother’s wife', 'great-aunt'); |
|
1403 | - case 'motparsibspo': |
|
1404 | - return I18N::translateContext('mother’s parent’s sibling’s spouse', 'great-aunt/uncle'); |
|
1405 | - case 'motparsishus': |
|
1406 | - return I18N::translateContext('mother’s parent’s sister’s husband', 'great-uncle'); |
|
1407 | - case 'parfatbrowif': |
|
1408 | - return I18N::translateContext('parent’s father’s brother’s wife', 'great-aunt'); |
|
1409 | - case 'parfatsibspo': |
|
1410 | - return I18N::translateContext('parent’s father’s sibling’s spouse', 'great-aunt/uncle'); |
|
1411 | - case 'parfatsishus': |
|
1412 | - return I18N::translateContext('parent’s father’s sister’s husband', 'great-uncle'); |
|
1413 | - case 'parmotbrowif': |
|
1414 | - return I18N::translateContext('parent’s mother’s brother’s wife', 'great-aunt'); |
|
1415 | - case 'parmotsibspo': |
|
1416 | - return I18N::translateContext('parent’s mother’s sibling’s spouse', 'great-aunt/uncle'); |
|
1417 | - case 'parmotsishus': |
|
1418 | - return I18N::translateContext('parent’s mother’s sister’s husband', 'great-uncle'); |
|
1419 | - case 'parparbrowif': |
|
1420 | - return I18N::translateContext('parent’s parent’s brother’s wife', 'great-aunt'); |
|
1421 | - case 'parparsibspo': |
|
1422 | - return I18N::translateContext('parent’s parent’s sibling’s spouse', 'great-aunt/uncle'); |
|
1423 | - case 'parparsishus': |
|
1424 | - return I18N::translateContext('parent’s parent’s sister’s husband', 'great-uncle'); |
|
1425 | - case 'fatfatbrodau': |
|
1426 | - return I18N::translateContext('father’s father’s brother’s daughter', 'first cousin once removed ascending'); |
|
1427 | - case 'fatfatbroson': |
|
1428 | - return I18N::translateContext('father’s father’s brother’s son', 'first cousin once removed ascending'); |
|
1429 | - case 'fatfatbrochi': |
|
1430 | - return I18N::translateContext('father’s father’s brother’s child', 'first cousin once removed ascending'); |
|
1431 | - case 'fatfatsisdau': |
|
1432 | - return I18N::translateContext('father’s father’s sister’s daughter', 'first cousin once removed ascending'); |
|
1433 | - case 'fatfatsisson': |
|
1434 | - return I18N::translateContext('father’s father’s sister’s son', 'first cousin once removed ascending'); |
|
1435 | - case 'fatfatsischi': |
|
1436 | - return I18N::translateContext('father’s father’s sister’s child', 'first cousin once removed ascending'); |
|
1437 | - case 'fatmotbrodau': |
|
1438 | - return I18N::translateContext('father’s mother’s brother’s daughter', 'first cousin once removed ascending'); |
|
1439 | - case 'fatmotbroson': |
|
1440 | - return I18N::translateContext('father’s mother’s brother’s son', 'first cousin once removed ascending'); |
|
1441 | - case 'fatmotbrochi': |
|
1442 | - return I18N::translateContext('father’s mother’s brother’s child', 'first cousin once removed ascending'); |
|
1443 | - case 'fatmotsisdau': |
|
1444 | - return I18N::translateContext('father’s mother’s sister’s daughter', 'first cousin once removed ascending'); |
|
1445 | - case 'fatmotsisson': |
|
1446 | - return I18N::translateContext('father’s mother’s sister’s son', 'first cousin once removed ascending'); |
|
1447 | - case 'fatmotsischi': |
|
1448 | - return I18N::translateContext('father’s mother’s sister’s child', 'first cousin once removed ascending'); |
|
1449 | - case 'motfatbrodau': |
|
1450 | - return I18N::translateContext('mother’s father’s brother’s daughter', 'first cousin once removed ascending'); |
|
1451 | - case 'motfatbroson': |
|
1452 | - return I18N::translateContext('mother’s father’s brother’s son', 'first cousin once removed ascending'); |
|
1453 | - case 'motfatbrochi': |
|
1454 | - return I18N::translateContext('mother’s father’s brother’s child', 'first cousin once removed ascending'); |
|
1455 | - case 'motfatsisdau': |
|
1456 | - return I18N::translateContext('mother’s father’s sister’s daughter', 'first cousin once removed ascending'); |
|
1457 | - case 'motfatsisson': |
|
1458 | - return I18N::translateContext('mother’s father’s sister’s son', 'first cousin once removed ascending'); |
|
1459 | - case 'motfatsischi': |
|
1460 | - return I18N::translateContext('mother’s father’s sister’s child', 'first cousin once removed ascending'); |
|
1461 | - case 'motmotbrodau': |
|
1462 | - return I18N::translateContext('mother’s mother’s brother’s daughter', 'first cousin once removed ascending'); |
|
1463 | - case 'motmotbroson': |
|
1464 | - return I18N::translateContext('mother’s mother’s brother’s son', 'first cousin once removed ascending'); |
|
1465 | - case 'motmotbrochi': |
|
1466 | - return I18N::translateContext('mother’s mother’s brother’s child', 'first cousin once removed ascending'); |
|
1467 | - case 'motmotsisdau': |
|
1468 | - return I18N::translateContext('mother’s mother’s sister’s daughter', 'first cousin once removed ascending'); |
|
1469 | - case 'motmotsisson': |
|
1470 | - return I18N::translateContext('mother’s mother’s sister’s son', 'first cousin once removed ascending'); |
|
1471 | - case 'motmotsischi': |
|
1472 | - return I18N::translateContext('mother’s mother’s sister’s child', 'first cousin once removed ascending'); |
|
1370 | + // Some “special case” level four relationships that have specific names in certain languages |
|
1371 | + case 'fatfatbrowif': |
|
1372 | + return I18N::translateContext('father’s father’s brother’s wife', 'great-aunt'); |
|
1373 | + case 'fatfatsibspo': |
|
1374 | + return I18N::translateContext('father’s father’s sibling’s spouse', 'great-aunt/uncle'); |
|
1375 | + case 'fatfatsishus': |
|
1376 | + return I18N::translateContext('father’s father’s sister’s husband', 'great-uncle'); |
|
1377 | + case 'fatmotbrowif': |
|
1378 | + return I18N::translateContext('father’s mother’s brother’s wife', 'great-aunt'); |
|
1379 | + case 'fatmotsibspo': |
|
1380 | + return I18N::translateContext('father’s mother’s sibling’s spouse', 'great-aunt/uncle'); |
|
1381 | + case 'fatmotsishus': |
|
1382 | + return I18N::translateContext('father’s mother’s sister’s husband', 'great-uncle'); |
|
1383 | + case 'fatparbrowif': |
|
1384 | + return I18N::translateContext('father’s parent’s brother’s wife', 'great-aunt'); |
|
1385 | + case 'fatparsibspo': |
|
1386 | + return I18N::translateContext('father’s parent’s sibling’s spouse', 'great-aunt/uncle'); |
|
1387 | + case 'fatparsishus': |
|
1388 | + return I18N::translateContext('father’s parent’s sister’s husband', 'great-uncle'); |
|
1389 | + case 'motfatbrowif': |
|
1390 | + return I18N::translateContext('mother’s father’s brother’s wife', 'great-aunt'); |
|
1391 | + case 'motfatsibspo': |
|
1392 | + return I18N::translateContext('mother’s father’s sibling’s spouse', 'great-aunt/uncle'); |
|
1393 | + case 'motfatsishus': |
|
1394 | + return I18N::translateContext('mother’s father’s sister’s husband', 'great-uncle'); |
|
1395 | + case 'motmotbrowif': |
|
1396 | + return I18N::translateContext('mother’s mother’s brother’s wife', 'great-aunt'); |
|
1397 | + case 'motmotsibspo': |
|
1398 | + return I18N::translateContext('mother’s mother’s sibling’s spouse', 'great-aunt/uncle'); |
|
1399 | + case 'motmotsishus': |
|
1400 | + return I18N::translateContext('mother’s mother’s sister’s husband', 'great-uncle'); |
|
1401 | + case 'motparbrowif': |
|
1402 | + return I18N::translateContext('mother’s parent’s brother’s wife', 'great-aunt'); |
|
1403 | + case 'motparsibspo': |
|
1404 | + return I18N::translateContext('mother’s parent’s sibling’s spouse', 'great-aunt/uncle'); |
|
1405 | + case 'motparsishus': |
|
1406 | + return I18N::translateContext('mother’s parent’s sister’s husband', 'great-uncle'); |
|
1407 | + case 'parfatbrowif': |
|
1408 | + return I18N::translateContext('parent’s father’s brother’s wife', 'great-aunt'); |
|
1409 | + case 'parfatsibspo': |
|
1410 | + return I18N::translateContext('parent’s father’s sibling’s spouse', 'great-aunt/uncle'); |
|
1411 | + case 'parfatsishus': |
|
1412 | + return I18N::translateContext('parent’s father’s sister’s husband', 'great-uncle'); |
|
1413 | + case 'parmotbrowif': |
|
1414 | + return I18N::translateContext('parent’s mother’s brother’s wife', 'great-aunt'); |
|
1415 | + case 'parmotsibspo': |
|
1416 | + return I18N::translateContext('parent’s mother’s sibling’s spouse', 'great-aunt/uncle'); |
|
1417 | + case 'parmotsishus': |
|
1418 | + return I18N::translateContext('parent’s mother’s sister’s husband', 'great-uncle'); |
|
1419 | + case 'parparbrowif': |
|
1420 | + return I18N::translateContext('parent’s parent’s brother’s wife', 'great-aunt'); |
|
1421 | + case 'parparsibspo': |
|
1422 | + return I18N::translateContext('parent’s parent’s sibling’s spouse', 'great-aunt/uncle'); |
|
1423 | + case 'parparsishus': |
|
1424 | + return I18N::translateContext('parent’s parent’s sister’s husband', 'great-uncle'); |
|
1425 | + case 'fatfatbrodau': |
|
1426 | + return I18N::translateContext('father’s father’s brother’s daughter', 'first cousin once removed ascending'); |
|
1427 | + case 'fatfatbroson': |
|
1428 | + return I18N::translateContext('father’s father’s brother’s son', 'first cousin once removed ascending'); |
|
1429 | + case 'fatfatbrochi': |
|
1430 | + return I18N::translateContext('father’s father’s brother’s child', 'first cousin once removed ascending'); |
|
1431 | + case 'fatfatsisdau': |
|
1432 | + return I18N::translateContext('father’s father’s sister’s daughter', 'first cousin once removed ascending'); |
|
1433 | + case 'fatfatsisson': |
|
1434 | + return I18N::translateContext('father’s father’s sister’s son', 'first cousin once removed ascending'); |
|
1435 | + case 'fatfatsischi': |
|
1436 | + return I18N::translateContext('father’s father’s sister’s child', 'first cousin once removed ascending'); |
|
1437 | + case 'fatmotbrodau': |
|
1438 | + return I18N::translateContext('father’s mother’s brother’s daughter', 'first cousin once removed ascending'); |
|
1439 | + case 'fatmotbroson': |
|
1440 | + return I18N::translateContext('father’s mother’s brother’s son', 'first cousin once removed ascending'); |
|
1441 | + case 'fatmotbrochi': |
|
1442 | + return I18N::translateContext('father’s mother’s brother’s child', 'first cousin once removed ascending'); |
|
1443 | + case 'fatmotsisdau': |
|
1444 | + return I18N::translateContext('father’s mother’s sister’s daughter', 'first cousin once removed ascending'); |
|
1445 | + case 'fatmotsisson': |
|
1446 | + return I18N::translateContext('father’s mother’s sister’s son', 'first cousin once removed ascending'); |
|
1447 | + case 'fatmotsischi': |
|
1448 | + return I18N::translateContext('father’s mother’s sister’s child', 'first cousin once removed ascending'); |
|
1449 | + case 'motfatbrodau': |
|
1450 | + return I18N::translateContext('mother’s father’s brother’s daughter', 'first cousin once removed ascending'); |
|
1451 | + case 'motfatbroson': |
|
1452 | + return I18N::translateContext('mother’s father’s brother’s son', 'first cousin once removed ascending'); |
|
1453 | + case 'motfatbrochi': |
|
1454 | + return I18N::translateContext('mother’s father’s brother’s child', 'first cousin once removed ascending'); |
|
1455 | + case 'motfatsisdau': |
|
1456 | + return I18N::translateContext('mother’s father’s sister’s daughter', 'first cousin once removed ascending'); |
|
1457 | + case 'motfatsisson': |
|
1458 | + return I18N::translateContext('mother’s father’s sister’s son', 'first cousin once removed ascending'); |
|
1459 | + case 'motfatsischi': |
|
1460 | + return I18N::translateContext('mother’s father’s sister’s child', 'first cousin once removed ascending'); |
|
1461 | + case 'motmotbrodau': |
|
1462 | + return I18N::translateContext('mother’s mother’s brother’s daughter', 'first cousin once removed ascending'); |
|
1463 | + case 'motmotbroson': |
|
1464 | + return I18N::translateContext('mother’s mother’s brother’s son', 'first cousin once removed ascending'); |
|
1465 | + case 'motmotbrochi': |
|
1466 | + return I18N::translateContext('mother’s mother’s brother’s child', 'first cousin once removed ascending'); |
|
1467 | + case 'motmotsisdau': |
|
1468 | + return I18N::translateContext('mother’s mother’s sister’s daughter', 'first cousin once removed ascending'); |
|
1469 | + case 'motmotsisson': |
|
1470 | + return I18N::translateContext('mother’s mother’s sister’s son', 'first cousin once removed ascending'); |
|
1471 | + case 'motmotsischi': |
|
1472 | + return I18N::translateContext('mother’s mother’s sister’s child', 'first cousin once removed ascending'); |
|
1473 | 1473 | } |
1474 | 1474 | |
1475 | 1475 | // Some “special case” level five relationships that have specific names in certain languages |
@@ -1535,125 +1535,125 @@ discard block |
||
1535 | 1535 | $up = strlen($match[1]) / 3; |
1536 | 1536 | $bef_last = substr($path, -6, 3); |
1537 | 1537 | switch ($up) { |
1538 | - case 3: |
|
1539 | - switch ($sex2) { |
|
1540 | - case 'M': |
|
1541 | - if ($bef_last === 'fat') { |
|
1542 | - return I18N::translateContext('great-grandfather’s brother', 'great-great-uncle'); |
|
1543 | - } elseif ($bef_last === 'mot') { |
|
1544 | - return I18N::translateContext('great-grandmother’s brother', 'great-great-uncle'); |
|
1545 | - } else { |
|
1546 | - return I18N::translateContext('great-grandparent’s brother', 'great-great-uncle'); |
|
1547 | - } |
|
1548 | - case 'F': |
|
1549 | - return I18N::translate('great-great-aunt'); |
|
1550 | - default: |
|
1551 | - return I18N::translate('great-great-aunt/uncle'); |
|
1552 | - } |
|
1553 | - case 4: |
|
1554 | - switch ($sex2) { |
|
1555 | - case 'M': |
|
1556 | - if ($bef_last === 'fat') { |
|
1557 | - return I18N::translateContext('great-great-grandfather’s brother', 'great-great-great-uncle'); |
|
1558 | - } elseif ($bef_last === 'mot') { |
|
1559 | - return I18N::translateContext('great-great-grandmother’s brother', 'great-great-great-uncle'); |
|
1560 | - } else { |
|
1561 | - return I18N::translateContext('great-great-grandparent’s brother', 'great-great-great-uncle'); |
|
1562 | - } |
|
1563 | - case 'F': |
|
1564 | - return I18N::translate('great-great-great-aunt'); |
|
1565 | - default: |
|
1566 | - return I18N::translate('great-great-great-aunt/uncle'); |
|
1567 | - } |
|
1568 | - case 5: |
|
1569 | - switch ($sex2) { |
|
1570 | - case 'M': |
|
1571 | - if ($bef_last === 'fat') { |
|
1572 | - return I18N::translateContext('great-great-great-grandfather’s brother', 'great ×4 uncle'); |
|
1573 | - } elseif ($bef_last === 'mot') { |
|
1574 | - return I18N::translateContext('great-great-great-grandmother’s brother', 'great ×4 uncle'); |
|
1575 | - } else { |
|
1576 | - return I18N::translateContext('great-great-great-grandparent’s brother', 'great ×4 uncle'); |
|
1577 | - } |
|
1578 | - case 'F': |
|
1579 | - return I18N::translate('great ×4 aunt'); |
|
1580 | - default: |
|
1581 | - return I18N::translate('great ×4 aunt/uncle'); |
|
1582 | - } |
|
1583 | - case 6: |
|
1584 | - switch ($sex2) { |
|
1585 | - case 'M': |
|
1586 | - if ($bef_last === 'fat') { |
|
1587 | - return I18N::translateContext('great ×4 grandfather’s brother', 'great ×5 uncle'); |
|
1588 | - } elseif ($bef_last === 'mot') { |
|
1589 | - return I18N::translateContext('great ×4 grandmother’s brother', 'great ×5 uncle'); |
|
1590 | - } else { |
|
1591 | - return I18N::translateContext('great ×4 grandparent’s brother', 'great ×5 uncle'); |
|
1592 | - } |
|
1593 | - case 'F': |
|
1594 | - return I18N::translate('great ×5 aunt'); |
|
1595 | - default: |
|
1596 | - return I18N::translate('great ×5 aunt/uncle'); |
|
1597 | - } |
|
1598 | - case 7: |
|
1599 | - switch ($sex2) { |
|
1600 | - case 'M': |
|
1601 | - if ($bef_last === 'fat') { |
|
1602 | - return I18N::translateContext('great ×5 grandfather’s brother', 'great ×6 uncle'); |
|
1603 | - } elseif ($bef_last === 'mot') { |
|
1604 | - return I18N::translateContext('great ×5 grandmother’s brother', 'great ×6 uncle'); |
|
1605 | - } else { |
|
1606 | - return I18N::translateContext('great ×5 grandparent’s brother', 'great ×6 uncle'); |
|
1607 | - } |
|
1608 | - case 'F': |
|
1609 | - return I18N::translate('great ×6 aunt'); |
|
1610 | - default: |
|
1611 | - return I18N::translate('great ×6 aunt/uncle'); |
|
1612 | - } |
|
1613 | - case 8: |
|
1614 | - switch ($sex2) { |
|
1615 | - case 'M': |
|
1616 | - if ($bef_last === 'fat') { |
|
1617 | - return I18N::translateContext('great ×6 grandfather’s brother', 'great ×7 uncle'); |
|
1618 | - } elseif ($bef_last === 'mot') { |
|
1619 | - return I18N::translateContext('great ×6 grandmother’s brother', 'great ×7 uncle'); |
|
1620 | - } else { |
|
1621 | - return I18N::translateContext('great ×6 grandparent’s brother', 'great ×7 uncle'); |
|
1622 | - } |
|
1623 | - case 'F': |
|
1624 | - return I18N::translate('great ×7 aunt'); |
|
1625 | - default: |
|
1626 | - return I18N::translate('great ×7 aunt/uncle'); |
|
1627 | - } |
|
1628 | - default: |
|
1629 | - // Different languages have different rules for naming generations. |
|
1630 | - // An English great ×12 uncle is a Danish great ×10 uncle. |
|
1631 | - // |
|
1632 | - // Need to find out which languages use which rules. |
|
1633 | - switch (WT_LOCALE) { |
|
1634 | - case 'da': |
|
1635 | - switch ($sex2) { |
|
1636 | - case 'M': |
|
1637 | - return I18N::translate('great ×%s uncle', I18N::number($up - 4)); |
|
1638 | - case 'F': |
|
1639 | - return I18N::translate('great ×%s aunt', I18N::number($up - 4)); |
|
1538 | + case 3: |
|
1539 | + switch ($sex2) { |
|
1540 | + case 'M': |
|
1541 | + if ($bef_last === 'fat') { |
|
1542 | + return I18N::translateContext('great-grandfather’s brother', 'great-great-uncle'); |
|
1543 | + } elseif ($bef_last === 'mot') { |
|
1544 | + return I18N::translateContext('great-grandmother’s brother', 'great-great-uncle'); |
|
1545 | + } else { |
|
1546 | + return I18N::translateContext('great-grandparent’s brother', 'great-great-uncle'); |
|
1547 | + } |
|
1548 | + case 'F': |
|
1549 | + return I18N::translate('great-great-aunt'); |
|
1550 | + default: |
|
1551 | + return I18N::translate('great-great-aunt/uncle'); |
|
1552 | + } |
|
1553 | + case 4: |
|
1554 | + switch ($sex2) { |
|
1555 | + case 'M': |
|
1556 | + if ($bef_last === 'fat') { |
|
1557 | + return I18N::translateContext('great-great-grandfather’s brother', 'great-great-great-uncle'); |
|
1558 | + } elseif ($bef_last === 'mot') { |
|
1559 | + return I18N::translateContext('great-great-grandmother’s brother', 'great-great-great-uncle'); |
|
1560 | + } else { |
|
1561 | + return I18N::translateContext('great-great-grandparent’s brother', 'great-great-great-uncle'); |
|
1562 | + } |
|
1563 | + case 'F': |
|
1564 | + return I18N::translate('great-great-great-aunt'); |
|
1565 | + default: |
|
1566 | + return I18N::translate('great-great-great-aunt/uncle'); |
|
1567 | + } |
|
1568 | + case 5: |
|
1569 | + switch ($sex2) { |
|
1570 | + case 'M': |
|
1571 | + if ($bef_last === 'fat') { |
|
1572 | + return I18N::translateContext('great-great-great-grandfather’s brother', 'great ×4 uncle'); |
|
1573 | + } elseif ($bef_last === 'mot') { |
|
1574 | + return I18N::translateContext('great-great-great-grandmother’s brother', 'great ×4 uncle'); |
|
1575 | + } else { |
|
1576 | + return I18N::translateContext('great-great-great-grandparent’s brother', 'great ×4 uncle'); |
|
1577 | + } |
|
1578 | + case 'F': |
|
1579 | + return I18N::translate('great ×4 aunt'); |
|
1580 | + default: |
|
1581 | + return I18N::translate('great ×4 aunt/uncle'); |
|
1582 | + } |
|
1583 | + case 6: |
|
1584 | + switch ($sex2) { |
|
1585 | + case 'M': |
|
1586 | + if ($bef_last === 'fat') { |
|
1587 | + return I18N::translateContext('great ×4 grandfather’s brother', 'great ×5 uncle'); |
|
1588 | + } elseif ($bef_last === 'mot') { |
|
1589 | + return I18N::translateContext('great ×4 grandmother’s brother', 'great ×5 uncle'); |
|
1590 | + } else { |
|
1591 | + return I18N::translateContext('great ×4 grandparent’s brother', 'great ×5 uncle'); |
|
1592 | + } |
|
1593 | + case 'F': |
|
1594 | + return I18N::translate('great ×5 aunt'); |
|
1595 | + default: |
|
1596 | + return I18N::translate('great ×5 aunt/uncle'); |
|
1597 | + } |
|
1598 | + case 7: |
|
1599 | + switch ($sex2) { |
|
1600 | + case 'M': |
|
1601 | + if ($bef_last === 'fat') { |
|
1602 | + return I18N::translateContext('great ×5 grandfather’s brother', 'great ×6 uncle'); |
|
1603 | + } elseif ($bef_last === 'mot') { |
|
1604 | + return I18N::translateContext('great ×5 grandmother’s brother', 'great ×6 uncle'); |
|
1605 | + } else { |
|
1606 | + return I18N::translateContext('great ×5 grandparent’s brother', 'great ×6 uncle'); |
|
1607 | + } |
|
1608 | + case 'F': |
|
1609 | + return I18N::translate('great ×6 aunt'); |
|
1610 | + default: |
|
1611 | + return I18N::translate('great ×6 aunt/uncle'); |
|
1612 | + } |
|
1613 | + case 8: |
|
1614 | + switch ($sex2) { |
|
1615 | + case 'M': |
|
1616 | + if ($bef_last === 'fat') { |
|
1617 | + return I18N::translateContext('great ×6 grandfather’s brother', 'great ×7 uncle'); |
|
1618 | + } elseif ($bef_last === 'mot') { |
|
1619 | + return I18N::translateContext('great ×6 grandmother’s brother', 'great ×7 uncle'); |
|
1620 | + } else { |
|
1621 | + return I18N::translateContext('great ×6 grandparent’s brother', 'great ×7 uncle'); |
|
1622 | + } |
|
1623 | + case 'F': |
|
1624 | + return I18N::translate('great ×7 aunt'); |
|
1625 | + default: |
|
1626 | + return I18N::translate('great ×7 aunt/uncle'); |
|
1627 | + } |
|
1640 | 1628 | default: |
1641 | - return I18N::translate('great ×%s aunt/uncle', I18N::number($up - 4)); |
|
1642 | - } |
|
1629 | + // Different languages have different rules for naming generations. |
|
1630 | + // An English great ×12 uncle is a Danish great ×10 uncle. |
|
1631 | + // |
|
1632 | + // Need to find out which languages use which rules. |
|
1633 | + switch (WT_LOCALE) { |
|
1634 | + case 'da': |
|
1635 | + switch ($sex2) { |
|
1636 | + case 'M': |
|
1637 | + return I18N::translate('great ×%s uncle', I18N::number($up - 4)); |
|
1638 | + case 'F': |
|
1639 | + return I18N::translate('great ×%s aunt', I18N::number($up - 4)); |
|
1640 | + default: |
|
1641 | + return I18N::translate('great ×%s aunt/uncle', I18N::number($up - 4)); |
|
1642 | + } |
|
1643 | 1643 | case 'pl': |
1644 | 1644 | switch ($sex2) { |
1645 | - case 'M': |
|
1646 | - if ($bef_last === 'fat') { |
|
1647 | - return I18N::translateContext('great ×(%s-1) grandfather’s brother', 'great ×%s uncle', I18N::number($up - 2)); |
|
1648 | - } elseif ($bef_last === 'mot') { |
|
1649 | - return I18N::translateContext('great ×(%s-1) grandmother’s brother', 'great ×%s uncle', I18N::number($up - 2)); |
|
1650 | - } else { |
|
1651 | - return I18N::translateContext('great ×(%s-1) grandparent’s brother', 'great ×%s uncle', I18N::number($up - 2)); |
|
1652 | - } |
|
1653 | - case 'F': |
|
1654 | - return I18N::translate('great ×%s aunt', I18N::number($up - 2)); |
|
1655 | - default: |
|
1656 | - return I18N::translate('great ×%s aunt/uncle', I18N::number($up - 2)); |
|
1645 | + case 'M': |
|
1646 | + if ($bef_last === 'fat') { |
|
1647 | + return I18N::translateContext('great ×(%s-1) grandfather’s brother', 'great ×%s uncle', I18N::number($up - 2)); |
|
1648 | + } elseif ($bef_last === 'mot') { |
|
1649 | + return I18N::translateContext('great ×(%s-1) grandmother’s brother', 'great ×%s uncle', I18N::number($up - 2)); |
|
1650 | + } else { |
|
1651 | + return I18N::translateContext('great ×(%s-1) grandparent’s brother', 'great ×%s uncle', I18N::number($up - 2)); |
|
1652 | + } |
|
1653 | + case 'F': |
|
1654 | + return I18N::translate('great ×%s aunt', I18N::number($up - 2)); |
|
1655 | + default: |
|
1656 | + return I18N::translate('great ×%s aunt/uncle', I18N::number($up - 2)); |
|
1657 | 1657 | } |
1658 | 1658 | case 'it': // Source: Michele Locati |
1659 | 1659 | case 'en_AU': |
@@ -1661,12 +1661,12 @@ discard block |
||
1661 | 1661 | case 'en_US': |
1662 | 1662 | default: |
1663 | 1663 | switch ($sex2) { |
1664 | - case 'M': // I18N: if you need a different number for %s, contact the developers, as a code-change is required |
|
1665 | - return I18N::translate('great ×%s uncle', I18N::number($up - 1)); |
|
1666 | - case 'F': |
|
1667 | - return I18N::translate('great ×%s aunt', I18N::number($up - 1)); |
|
1668 | - default: |
|
1669 | - return I18N::translate('great ×%s aunt/uncle', I18N::number($up - 1)); |
|
1664 | + case 'M': // I18N: if you need a different number for %s, contact the developers, as a code-change is required |
|
1665 | + return I18N::translate('great ×%s uncle', I18N::number($up - 1)); |
|
1666 | + case 'F': |
|
1667 | + return I18N::translate('great ×%s aunt', I18N::number($up - 1)); |
|
1668 | + default: |
|
1669 | + return I18N::translate('great ×%s aunt/uncle', I18N::number($up - 1)); |
|
1670 | 1670 | } |
1671 | 1671 | } |
1672 | 1672 | } |
@@ -1676,155 +1676,155 @@ discard block |
||
1676 | 1676 | $down = strlen($match[1]) / 3 + 1; // Add one, as we count generations from the common ancestor |
1677 | 1677 | $first = substr($path, 0, 3); |
1678 | 1678 | switch ($down) { |
1679 | - case 4: |
|
1680 | - switch ($sex2) { |
|
1681 | - case 'M': |
|
1682 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1683 | - return I18N::translateContext('(a man’s) brother’s great-grandson', 'great-great-nephew'); |
|
1684 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1685 | - return I18N::translateContext('(a man’s) sister’s great-grandson', 'great-great-nephew'); |
|
1686 | - } else { |
|
1687 | - return I18N::translateContext('(a woman’s) great-great-nephew', 'great-great-nephew'); |
|
1688 | - } |
|
1689 | - case 'F': |
|
1690 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1691 | - return I18N::translateContext('(a man’s) brother’s great-granddaughter', 'great-great-niece'); |
|
1692 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1693 | - return I18N::translateContext('(a man’s) sister’s great-granddaughter', 'great-great-niece'); |
|
1694 | - } else { |
|
1695 | - return I18N::translateContext('(a woman’s) great-great-niece', 'great-great-niece'); |
|
1696 | - } |
|
1697 | - default: |
|
1698 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1699 | - return I18N::translateContext('(a man’s) brother’s great-grandchild', 'great-great-nephew/niece'); |
|
1700 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1701 | - return I18N::translateContext('(a man’s) sister’s great-grandchild', 'great-great-nephew/niece'); |
|
1702 | - } else { |
|
1703 | - return I18N::translateContext('(a woman’s) great-great-nephew/niece', 'great-great-nephew/niece'); |
|
1704 | - } |
|
1705 | - } |
|
1706 | - case 5: |
|
1707 | - switch ($sex2) { |
|
1708 | - case 'M': |
|
1709 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1710 | - return I18N::translateContext('(a man’s) brother’s great-great-grandson', 'great-great-great-nephew'); |
|
1711 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1712 | - return I18N::translateContext('(a man’s) sister’s great-great-grandson', 'great-great-great-nephew'); |
|
1713 | - } else { |
|
1714 | - return I18N::translateContext('(a woman’s) great-great-great-nephew', 'great-great-great-nephew'); |
|
1715 | - } |
|
1716 | - case 'F': |
|
1717 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1718 | - return I18N::translateContext('(a man’s) brother’s great-great-granddaughter', 'great-great-great-niece'); |
|
1719 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1720 | - return I18N::translateContext('(a man’s) sister’s great-great-granddaughter', 'great-great-great-niece'); |
|
1721 | - } else { |
|
1722 | - return I18N::translateContext('(a woman’s) great-great-great-niece', 'great-great-great-niece'); |
|
1723 | - } |
|
1724 | - default: |
|
1725 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1726 | - return I18N::translateContext('(a man’s) brother’s great-great-grandchild', 'great-great-great-nephew/niece'); |
|
1727 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1728 | - return I18N::translateContext('(a man’s) sister’s great-great-grandchild', 'great-great-great-nephew/niece'); |
|
1729 | - } else { |
|
1730 | - return I18N::translateContext('(a woman’s) great-great-great-nephew/niece', 'great-great-great-nephew/niece'); |
|
1731 | - } |
|
1732 | - } |
|
1733 | - case 6: |
|
1734 | - switch ($sex2) { |
|
1735 | - case 'M': |
|
1736 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1737 | - return I18N::translateContext('(a man’s) brother’s great-great-great-grandson', 'great ×4 nephew'); |
|
1738 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1739 | - return I18N::translateContext('(a man’s) sister’s great-great-great-grandson', 'great ×4 nephew'); |
|
1740 | - } else { |
|
1741 | - return I18N::translateContext('(a woman’s) great ×4 nephew', 'great ×4 nephew'); |
|
1742 | - } |
|
1743 | - case 'F': |
|
1744 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1745 | - return I18N::translateContext('(a man’s) brother’s great-great-great-granddaughter', 'great ×4 niece'); |
|
1746 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1747 | - return I18N::translateContext('(a man’s) sister’s great-great-great-granddaughter', 'great ×4 niece'); |
|
1748 | - } else { |
|
1749 | - return I18N::translateContext('(a woman’s) great ×4 niece', 'great ×4 niece'); |
|
1750 | - } |
|
1751 | - default: |
|
1752 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1753 | - return I18N::translateContext('(a man’s) brother’s great-great-great-grandchild', 'great ×4 nephew/niece'); |
|
1754 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1755 | - return I18N::translateContext('(a man’s) sister’s great-great-great-grandchild', 'great ×4 nephew/niece'); |
|
1756 | - } else { |
|
1757 | - return I18N::translateContext('(a woman’s) great ×4 nephew/niece', 'great ×4 nephew/niece'); |
|
1758 | - } |
|
1759 | - } |
|
1760 | - case 7: |
|
1761 | - switch ($sex2) { |
|
1762 | - case 'M': |
|
1763 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1764 | - return I18N::translateContext('(a man’s) brother’s great ×4 grandson', 'great ×5 nephew'); |
|
1765 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1766 | - return I18N::translateContext('(a man’s) sister’s great ×4 grandson', 'great ×5 nephew'); |
|
1767 | - } else { |
|
1768 | - return I18N::translateContext('(a woman’s) great ×5 nephew', 'great ×5 nephew'); |
|
1769 | - } |
|
1770 | - case 'F': |
|
1771 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1772 | - return I18N::translateContext('(a man’s) brother’s great ×4 granddaughter', 'great ×5 niece'); |
|
1773 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1774 | - return I18N::translateContext('(a man’s) sister’s great ×4 granddaughter', 'great ×5 niece'); |
|
1775 | - } else { |
|
1776 | - return I18N::translateContext('(a woman’s) great ×5 niece', 'great ×5 niece'); |
|
1777 | - } |
|
1778 | - default: |
|
1779 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1780 | - return I18N::translateContext('(a man’s) brother’s great ×4 grandchild', 'great ×5 nephew/niece'); |
|
1781 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1782 | - return I18N::translateContext('(a man’s) sister’s great ×4 grandchild', 'great ×5 nephew/niece'); |
|
1783 | - } else { |
|
1784 | - return I18N::translateContext('(a woman’s) great ×5 nephew/niece', 'great ×5 nephew/niece'); |
|
1785 | - } |
|
1786 | - } |
|
1787 | - default: |
|
1788 | - // Different languages have different rules for naming generations. |
|
1789 | - // An English great ×12 nephew is a Polish great ×11 nephew. |
|
1790 | - // |
|
1791 | - // Need to find out which languages use which rules. |
|
1792 | - switch (WT_LOCALE) { |
|
1793 | - case 'pl': // Source: Lukasz Wilenski |
|
1794 | - switch ($sex2) { |
|
1795 | - case 'M': |
|
1796 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1797 | - return I18N::translateContext('(a man’s) brother’s great ×(%s-1) grandson', 'great ×%s nephew', I18N::number($down - 3)); |
|
1798 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1799 | - return I18N::translateContext('(a man’s) sister’s great ×(%s-1) grandson', 'great ×%s nephew', I18N::number($down - 3)); |
|
1800 | - } else { |
|
1801 | - return I18N::translateContext('(a woman’s) great ×%s nephew', 'great ×%s nephew', I18N::number($down - 3)); |
|
1802 | - } |
|
1803 | - case 'F': |
|
1804 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1805 | - return I18N::translateContext('(a man’s) brother’s great ×(%s-1) granddaughter', 'great ×%s niece', I18N::number($down - 3)); |
|
1806 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1807 | - return I18N::translateContext('(a man’s) sister’s great ×(%s-1) granddaughter', 'great ×%s niece', I18N::number($down - 3)); |
|
1808 | - } else { |
|
1809 | - return I18N::translateContext('(a woman’s) great ×%s niece', 'great ×%s niece', I18N::number($down - 3)); |
|
1810 | - } |
|
1679 | + case 4: |
|
1680 | + switch ($sex2) { |
|
1681 | + case 'M': |
|
1682 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1683 | + return I18N::translateContext('(a man’s) brother’s great-grandson', 'great-great-nephew'); |
|
1684 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1685 | + return I18N::translateContext('(a man’s) sister’s great-grandson', 'great-great-nephew'); |
|
1686 | + } else { |
|
1687 | + return I18N::translateContext('(a woman’s) great-great-nephew', 'great-great-nephew'); |
|
1688 | + } |
|
1689 | + case 'F': |
|
1690 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1691 | + return I18N::translateContext('(a man’s) brother’s great-granddaughter', 'great-great-niece'); |
|
1692 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1693 | + return I18N::translateContext('(a man’s) sister’s great-granddaughter', 'great-great-niece'); |
|
1694 | + } else { |
|
1695 | + return I18N::translateContext('(a woman’s) great-great-niece', 'great-great-niece'); |
|
1696 | + } |
|
1697 | + default: |
|
1698 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1699 | + return I18N::translateContext('(a man’s) brother’s great-grandchild', 'great-great-nephew/niece'); |
|
1700 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1701 | + return I18N::translateContext('(a man’s) sister’s great-grandchild', 'great-great-nephew/niece'); |
|
1702 | + } else { |
|
1703 | + return I18N::translateContext('(a woman’s) great-great-nephew/niece', 'great-great-nephew/niece'); |
|
1704 | + } |
|
1705 | + } |
|
1706 | + case 5: |
|
1707 | + switch ($sex2) { |
|
1708 | + case 'M': |
|
1709 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1710 | + return I18N::translateContext('(a man’s) brother’s great-great-grandson', 'great-great-great-nephew'); |
|
1711 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1712 | + return I18N::translateContext('(a man’s) sister’s great-great-grandson', 'great-great-great-nephew'); |
|
1713 | + } else { |
|
1714 | + return I18N::translateContext('(a woman’s) great-great-great-nephew', 'great-great-great-nephew'); |
|
1715 | + } |
|
1716 | + case 'F': |
|
1717 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1718 | + return I18N::translateContext('(a man’s) brother’s great-great-granddaughter', 'great-great-great-niece'); |
|
1719 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1720 | + return I18N::translateContext('(a man’s) sister’s great-great-granddaughter', 'great-great-great-niece'); |
|
1721 | + } else { |
|
1722 | + return I18N::translateContext('(a woman’s) great-great-great-niece', 'great-great-great-niece'); |
|
1723 | + } |
|
1724 | + default: |
|
1725 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1726 | + return I18N::translateContext('(a man’s) brother’s great-great-grandchild', 'great-great-great-nephew/niece'); |
|
1727 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1728 | + return I18N::translateContext('(a man’s) sister’s great-great-grandchild', 'great-great-great-nephew/niece'); |
|
1729 | + } else { |
|
1730 | + return I18N::translateContext('(a woman’s) great-great-great-nephew/niece', 'great-great-great-nephew/niece'); |
|
1731 | + } |
|
1732 | + } |
|
1733 | + case 6: |
|
1734 | + switch ($sex2) { |
|
1735 | + case 'M': |
|
1736 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1737 | + return I18N::translateContext('(a man’s) brother’s great-great-great-grandson', 'great ×4 nephew'); |
|
1738 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1739 | + return I18N::translateContext('(a man’s) sister’s great-great-great-grandson', 'great ×4 nephew'); |
|
1740 | + } else { |
|
1741 | + return I18N::translateContext('(a woman’s) great ×4 nephew', 'great ×4 nephew'); |
|
1742 | + } |
|
1743 | + case 'F': |
|
1744 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1745 | + return I18N::translateContext('(a man’s) brother’s great-great-great-granddaughter', 'great ×4 niece'); |
|
1746 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1747 | + return I18N::translateContext('(a man’s) sister’s great-great-great-granddaughter', 'great ×4 niece'); |
|
1748 | + } else { |
|
1749 | + return I18N::translateContext('(a woman’s) great ×4 niece', 'great ×4 niece'); |
|
1750 | + } |
|
1751 | + default: |
|
1752 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1753 | + return I18N::translateContext('(a man’s) brother’s great-great-great-grandchild', 'great ×4 nephew/niece'); |
|
1754 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1755 | + return I18N::translateContext('(a man’s) sister’s great-great-great-grandchild', 'great ×4 nephew/niece'); |
|
1756 | + } else { |
|
1757 | + return I18N::translateContext('(a woman’s) great ×4 nephew/niece', 'great ×4 nephew/niece'); |
|
1758 | + } |
|
1759 | + } |
|
1760 | + case 7: |
|
1761 | + switch ($sex2) { |
|
1762 | + case 'M': |
|
1763 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1764 | + return I18N::translateContext('(a man’s) brother’s great ×4 grandson', 'great ×5 nephew'); |
|
1765 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1766 | + return I18N::translateContext('(a man’s) sister’s great ×4 grandson', 'great ×5 nephew'); |
|
1767 | + } else { |
|
1768 | + return I18N::translateContext('(a woman’s) great ×5 nephew', 'great ×5 nephew'); |
|
1769 | + } |
|
1770 | + case 'F': |
|
1771 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1772 | + return I18N::translateContext('(a man’s) brother’s great ×4 granddaughter', 'great ×5 niece'); |
|
1773 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1774 | + return I18N::translateContext('(a man’s) sister’s great ×4 granddaughter', 'great ×5 niece'); |
|
1775 | + } else { |
|
1776 | + return I18N::translateContext('(a woman’s) great ×5 niece', 'great ×5 niece'); |
|
1777 | + } |
|
1778 | + default: |
|
1779 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1780 | + return I18N::translateContext('(a man’s) brother’s great ×4 grandchild', 'great ×5 nephew/niece'); |
|
1781 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1782 | + return I18N::translateContext('(a man’s) sister’s great ×4 grandchild', 'great ×5 nephew/niece'); |
|
1783 | + } else { |
|
1784 | + return I18N::translateContext('(a woman’s) great ×5 nephew/niece', 'great ×5 nephew/niece'); |
|
1785 | + } |
|
1786 | + } |
|
1811 | 1787 | default: |
1812 | - if ($first === 'bro' && $sex1 === 'M') { |
|
1813 | - return I18N::translateContext('(a man’s) brother’s great ×(%s-1) grandchild', 'great ×%s nephew/niece', I18N::number($down - 3)); |
|
1814 | - } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1815 | - return I18N::translateContext('(a man’s) sister’s great ×(%s-1) grandchild', 'great ×%s nephew/niece', I18N::number($down - 3)); |
|
1816 | - } else { |
|
1817 | - return I18N::translateContext('(a woman’s) great ×%s nephew/niece', 'great ×%s nephew/niece', I18N::number($down - 3)); |
|
1818 | - } |
|
1819 | - } |
|
1788 | + // Different languages have different rules for naming generations. |
|
1789 | + // An English great ×12 nephew is a Polish great ×11 nephew. |
|
1790 | + // |
|
1791 | + // Need to find out which languages use which rules. |
|
1792 | + switch (WT_LOCALE) { |
|
1793 | + case 'pl': // Source: Lukasz Wilenski |
|
1794 | + switch ($sex2) { |
|
1795 | + case 'M': |
|
1796 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1797 | + return I18N::translateContext('(a man’s) brother’s great ×(%s-1) grandson', 'great ×%s nephew', I18N::number($down - 3)); |
|
1798 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1799 | + return I18N::translateContext('(a man’s) sister’s great ×(%s-1) grandson', 'great ×%s nephew', I18N::number($down - 3)); |
|
1800 | + } else { |
|
1801 | + return I18N::translateContext('(a woman’s) great ×%s nephew', 'great ×%s nephew', I18N::number($down - 3)); |
|
1802 | + } |
|
1803 | + case 'F': |
|
1804 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1805 | + return I18N::translateContext('(a man’s) brother’s great ×(%s-1) granddaughter', 'great ×%s niece', I18N::number($down - 3)); |
|
1806 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1807 | + return I18N::translateContext('(a man’s) sister’s great ×(%s-1) granddaughter', 'great ×%s niece', I18N::number($down - 3)); |
|
1808 | + } else { |
|
1809 | + return I18N::translateContext('(a woman’s) great ×%s niece', 'great ×%s niece', I18N::number($down - 3)); |
|
1810 | + } |
|
1811 | + default: |
|
1812 | + if ($first === 'bro' && $sex1 === 'M') { |
|
1813 | + return I18N::translateContext('(a man’s) brother’s great ×(%s-1) grandchild', 'great ×%s nephew/niece', I18N::number($down - 3)); |
|
1814 | + } elseif ($first === 'sis' && $sex1 === 'M') { |
|
1815 | + return I18N::translateContext('(a man’s) sister’s great ×(%s-1) grandchild', 'great ×%s nephew/niece', I18N::number($down - 3)); |
|
1816 | + } else { |
|
1817 | + return I18N::translateContext('(a woman’s) great ×%s nephew/niece', 'great ×%s nephew/niece', I18N::number($down - 3)); |
|
1818 | + } |
|
1819 | + } |
|
1820 | 1820 | case 'he': // Source: Meliza Amity |
1821 | 1821 | switch ($sex2) { |
1822 | - case 'M': |
|
1823 | - return I18N::translate('great ×%s nephew', I18N::number($down - 1)); |
|
1824 | - case 'F': |
|
1825 | - return I18N::translate('great ×%s niece', I18N::number($down - 1)); |
|
1826 | - default: |
|
1827 | - return I18N::translate('great ×%s nephew/niece', I18N::number($down - 1)); |
|
1822 | + case 'M': |
|
1823 | + return I18N::translate('great ×%s nephew', I18N::number($down - 1)); |
|
1824 | + case 'F': |
|
1825 | + return I18N::translate('great ×%s niece', I18N::number($down - 1)); |
|
1826 | + default: |
|
1827 | + return I18N::translate('great ×%s nephew/niece', I18N::number($down - 1)); |
|
1828 | 1828 | } |
1829 | 1829 | case 'it': // Source: Michele Locati. |
1830 | 1830 | case 'en_AU': |
@@ -1832,12 +1832,12 @@ discard block |
||
1832 | 1832 | case 'en_US': |
1833 | 1833 | default: |
1834 | 1834 | switch ($sex2) { |
1835 | - case 'M': // I18N: if you need a different number for %s, contact the developers, as a code-change is required |
|
1836 | - return I18N::translate('great ×%s nephew', I18N::number($down - 2)); |
|
1837 | - case 'F': |
|
1838 | - return I18N::translate('great ×%s niece', I18N::number($down - 2)); |
|
1839 | - default: |
|
1840 | - return I18N::translate('great ×%s nephew/niece', I18N::number($down - 2)); |
|
1835 | + case 'M': // I18N: if you need a different number for %s, contact the developers, as a code-change is required |
|
1836 | + return I18N::translate('great ×%s nephew', I18N::number($down - 2)); |
|
1837 | + case 'F': |
|
1838 | + return I18N::translate('great ×%s niece', I18N::number($down - 2)); |
|
1839 | + default: |
|
1840 | + return I18N::translate('great ×%s nephew/niece', I18N::number($down - 2)); |
|
1841 | 1841 | } |
1842 | 1842 | } |
1843 | 1843 | } |
@@ -1846,116 +1846,116 @@ discard block |
||
1846 | 1846 | // direct ancestors |
1847 | 1847 | $up = strlen($match[1]) / 3; |
1848 | 1848 | switch ($up) { |
1849 | - case 4: |
|
1850 | - switch ($sex2) { |
|
1851 | - case 'M': |
|
1852 | - return I18N::translate('great-great-grandfather'); |
|
1853 | - case 'F': |
|
1854 | - return I18N::translate('great-great-grandmother'); |
|
1855 | - default: |
|
1856 | - return I18N::translate('great-great-grandparent'); |
|
1857 | - } |
|
1858 | - case 5: |
|
1859 | - switch ($sex2) { |
|
1860 | - case 'M': |
|
1861 | - return I18N::translate('great-great-great-grandfather'); |
|
1862 | - case 'F': |
|
1863 | - return I18N::translate('great-great-great-grandmother'); |
|
1864 | - default: |
|
1865 | - return I18N::translate('great-great-great-grandparent'); |
|
1866 | - } |
|
1867 | - case 6: |
|
1868 | - switch ($sex2) { |
|
1869 | - case 'M': |
|
1870 | - return I18N::translate('great ×4 grandfather'); |
|
1871 | - case 'F': |
|
1872 | - return I18N::translate('great ×4 grandmother'); |
|
1873 | - default: |
|
1874 | - return I18N::translate('great ×4 grandparent'); |
|
1875 | - } |
|
1876 | - case 7: |
|
1877 | - switch ($sex2) { |
|
1878 | - case 'M': |
|
1879 | - return I18N::translate('great ×5 grandfather'); |
|
1880 | - case 'F': |
|
1881 | - return I18N::translate('great ×5 grandmother'); |
|
1882 | - default: |
|
1883 | - return I18N::translate('great ×5 grandparent'); |
|
1884 | - } |
|
1885 | - case 8: |
|
1886 | - switch ($sex2) { |
|
1887 | - case 'M': |
|
1888 | - return I18N::translate('great ×6 grandfather'); |
|
1889 | - case 'F': |
|
1890 | - return I18N::translate('great ×6 grandmother'); |
|
1891 | - default: |
|
1892 | - return I18N::translate('great ×6 grandparent'); |
|
1893 | - } |
|
1894 | - case 9: |
|
1895 | - switch ($sex2) { |
|
1896 | - case 'M': |
|
1897 | - return I18N::translate('great ×7 grandfather'); |
|
1898 | - case 'F': |
|
1899 | - return I18N::translate('great ×7 grandmother'); |
|
1900 | - default: |
|
1901 | - return I18N::translate('great ×7 grandparent'); |
|
1902 | - } |
|
1903 | - default: |
|
1904 | - // Different languages have different rules for naming generations. |
|
1905 | - // An English great ×12 grandfather is a Danish great ×11 grandfather. |
|
1906 | - // |
|
1907 | - // Need to find out which languages use which rules. |
|
1908 | - switch (WT_LOCALE) { |
|
1909 | - case 'da': // Source: Patrick Sorensen |
|
1910 | - switch ($sex2) { |
|
1911 | - case 'M': |
|
1912 | - return I18N::translate('great ×%s grandfather', I18N::number($up - 3)); |
|
1913 | - case 'F': |
|
1914 | - return I18N::translate('great ×%s grandmother', I18N::number($up - 3)); |
|
1849 | + case 4: |
|
1850 | + switch ($sex2) { |
|
1851 | + case 'M': |
|
1852 | + return I18N::translate('great-great-grandfather'); |
|
1853 | + case 'F': |
|
1854 | + return I18N::translate('great-great-grandmother'); |
|
1855 | + default: |
|
1856 | + return I18N::translate('great-great-grandparent'); |
|
1857 | + } |
|
1858 | + case 5: |
|
1859 | + switch ($sex2) { |
|
1860 | + case 'M': |
|
1861 | + return I18N::translate('great-great-great-grandfather'); |
|
1862 | + case 'F': |
|
1863 | + return I18N::translate('great-great-great-grandmother'); |
|
1864 | + default: |
|
1865 | + return I18N::translate('great-great-great-grandparent'); |
|
1866 | + } |
|
1867 | + case 6: |
|
1868 | + switch ($sex2) { |
|
1869 | + case 'M': |
|
1870 | + return I18N::translate('great ×4 grandfather'); |
|
1871 | + case 'F': |
|
1872 | + return I18N::translate('great ×4 grandmother'); |
|
1873 | + default: |
|
1874 | + return I18N::translate('great ×4 grandparent'); |
|
1875 | + } |
|
1876 | + case 7: |
|
1877 | + switch ($sex2) { |
|
1878 | + case 'M': |
|
1879 | + return I18N::translate('great ×5 grandfather'); |
|
1880 | + case 'F': |
|
1881 | + return I18N::translate('great ×5 grandmother'); |
|
1882 | + default: |
|
1883 | + return I18N::translate('great ×5 grandparent'); |
|
1884 | + } |
|
1885 | + case 8: |
|
1886 | + switch ($sex2) { |
|
1887 | + case 'M': |
|
1888 | + return I18N::translate('great ×6 grandfather'); |
|
1889 | + case 'F': |
|
1890 | + return I18N::translate('great ×6 grandmother'); |
|
1891 | + default: |
|
1892 | + return I18N::translate('great ×6 grandparent'); |
|
1893 | + } |
|
1894 | + case 9: |
|
1895 | + switch ($sex2) { |
|
1896 | + case 'M': |
|
1897 | + return I18N::translate('great ×7 grandfather'); |
|
1898 | + case 'F': |
|
1899 | + return I18N::translate('great ×7 grandmother'); |
|
1900 | + default: |
|
1901 | + return I18N::translate('great ×7 grandparent'); |
|
1902 | + } |
|
1915 | 1903 | default: |
1916 | - return I18N::translate('great ×%s grandparent', I18N::number($up - 3)); |
|
1917 | - } |
|
1904 | + // Different languages have different rules for naming generations. |
|
1905 | + // An English great ×12 grandfather is a Danish great ×11 grandfather. |
|
1906 | + // |
|
1907 | + // Need to find out which languages use which rules. |
|
1908 | + switch (WT_LOCALE) { |
|
1909 | + case 'da': // Source: Patrick Sorensen |
|
1910 | + switch ($sex2) { |
|
1911 | + case 'M': |
|
1912 | + return I18N::translate('great ×%s grandfather', I18N::number($up - 3)); |
|
1913 | + case 'F': |
|
1914 | + return I18N::translate('great ×%s grandmother', I18N::number($up - 3)); |
|
1915 | + default: |
|
1916 | + return I18N::translate('great ×%s grandparent', I18N::number($up - 3)); |
|
1917 | + } |
|
1918 | 1918 | case 'it': // Source: Michele Locati |
1919 | 1919 | case 'es': // Source: Wes Groleau |
1920 | 1920 | switch ($sex2) { |
1921 | - case 'M': |
|
1922 | - return I18N::translate('great ×%s grandfather', I18N::number($up)); |
|
1923 | - case 'F': |
|
1924 | - return I18N::translate('great ×%s grandmother', I18N::number($up)); |
|
1925 | - default: |
|
1926 | - return I18N::translate('great ×%s grandparent', I18N::number($up)); |
|
1921 | + case 'M': |
|
1922 | + return I18N::translate('great ×%s grandfather', I18N::number($up)); |
|
1923 | + case 'F': |
|
1924 | + return I18N::translate('great ×%s grandmother', I18N::number($up)); |
|
1925 | + default: |
|
1926 | + return I18N::translate('great ×%s grandparent', I18N::number($up)); |
|
1927 | 1927 | } |
1928 | 1928 | case 'fr': // Source: Jacqueline Tetreault |
1929 | 1929 | case 'fr_CA': |
1930 | 1930 | switch ($sex2) { |
1931 | - case 'M': |
|
1932 | - return I18N::translate('great ×%s grandfather', I18N::number($up - 1)); |
|
1933 | - case 'F': |
|
1934 | - return I18N::translate('great ×%s grandmother', I18N::number($up - 1)); |
|
1935 | - default: |
|
1936 | - return I18N::translate('great ×%s grandparent', I18N::number($up - 1)); |
|
1931 | + case 'M': |
|
1932 | + return I18N::translate('great ×%s grandfather', I18N::number($up - 1)); |
|
1933 | + case 'F': |
|
1934 | + return I18N::translate('great ×%s grandmother', I18N::number($up - 1)); |
|
1935 | + default: |
|
1936 | + return I18N::translate('great ×%s grandparent', I18N::number($up - 1)); |
|
1937 | 1937 | } |
1938 | 1938 | case 'nn': // Source: Hogne Røed Nilsen (https://bugs.launchpad.net/webtrees/+bug/1168553) |
1939 | 1939 | case 'nb': |
1940 | 1940 | switch ($sex2) { |
1941 | - case 'M': // I18N: if you need a different number for %s, contact the developers, as a code-change is required |
|
1942 | - return I18N::translate('great ×%s grandfather', I18N::number($up - 3)); |
|
1943 | - case 'F': |
|
1944 | - return I18N::translate('great ×%s grandmother', I18N::number($up - 3)); |
|
1945 | - default: |
|
1946 | - return I18N::translate('great ×%s grandparent', I18N::number($up - 3)); |
|
1941 | + case 'M': // I18N: if you need a different number for %s, contact the developers, as a code-change is required |
|
1942 | + return I18N::translate('great ×%s grandfather', I18N::number($up - 3)); |
|
1943 | + case 'F': |
|
1944 | + return I18N::translate('great ×%s grandmother', I18N::number($up - 3)); |
|
1945 | + default: |
|
1946 | + return I18N::translate('great ×%s grandparent', I18N::number($up - 3)); |
|
1947 | 1947 | } |
1948 | 1948 | case 'en_AU': |
1949 | 1949 | case 'en_GB': |
1950 | 1950 | case 'en_US': |
1951 | 1951 | default: |
1952 | 1952 | switch ($sex2) { |
1953 | - case 'M': // I18N: if you need a different number for %s, contact the developers, as a code-change is required |
|
1954 | - return I18N::translate('great ×%s grandfather', I18N::number($up - 2)); |
|
1955 | - case 'F': |
|
1956 | - return I18N::translate('great ×%s grandmother', I18N::number($up - 2)); |
|
1957 | - default: |
|
1958 | - return I18N::translate('great ×%s grandparent', I18N::number($up - 2)); |
|
1953 | + case 'M': // I18N: if you need a different number for %s, contact the developers, as a code-change is required |
|
1954 | + return I18N::translate('great ×%s grandfather', I18N::number($up - 2)); |
|
1955 | + case 'F': |
|
1956 | + return I18N::translate('great ×%s grandmother', I18N::number($up - 2)); |
|
1957 | + default: |
|
1958 | + return I18N::translate('great ×%s grandparent', I18N::number($up - 2)); |
|
1959 | 1959 | } |
1960 | 1960 | } |
1961 | 1961 | } |
@@ -1964,83 +1964,83 @@ discard block |
||
1964 | 1964 | // direct descendants |
1965 | 1965 | $up = strlen($match[1]) / 3; |
1966 | 1966 | switch ($up) { |
1967 | - case 4: |
|
1968 | - switch ($sex2) { |
|
1969 | - case 'M': |
|
1970 | - return I18N::translate('great-great-grandson'); |
|
1971 | - case 'F': |
|
1972 | - return I18N::translate('great-great-granddaughter'); |
|
1973 | - default: |
|
1974 | - return I18N::translate('great-great-grandchild'); |
|
1975 | - } |
|
1967 | + case 4: |
|
1968 | + switch ($sex2) { |
|
1969 | + case 'M': |
|
1970 | + return I18N::translate('great-great-grandson'); |
|
1971 | + case 'F': |
|
1972 | + return I18N::translate('great-great-granddaughter'); |
|
1973 | + default: |
|
1974 | + return I18N::translate('great-great-grandchild'); |
|
1975 | + } |
|
1976 | 1976 | |
1977 | - case 5: |
|
1978 | - switch ($sex2) { |
|
1979 | - case 'M': |
|
1980 | - return I18N::translate('great-great-great-grandson'); |
|
1981 | - case 'F': |
|
1982 | - return I18N::translate('great-great-great-granddaughter'); |
|
1983 | - default: |
|
1984 | - return I18N::translate('great-great-great-grandchild'); |
|
1985 | - } |
|
1977 | + case 5: |
|
1978 | + switch ($sex2) { |
|
1979 | + case 'M': |
|
1980 | + return I18N::translate('great-great-great-grandson'); |
|
1981 | + case 'F': |
|
1982 | + return I18N::translate('great-great-great-granddaughter'); |
|
1983 | + default: |
|
1984 | + return I18N::translate('great-great-great-grandchild'); |
|
1985 | + } |
|
1986 | 1986 | |
1987 | - case 6: |
|
1988 | - switch ($sex2) { |
|
1989 | - case 'M': |
|
1990 | - return I18N::translate('great ×4 grandson'); |
|
1991 | - case 'F': |
|
1992 | - return I18N::translate('great ×4 granddaughter'); |
|
1993 | - default: |
|
1994 | - return I18N::translate('great ×4 grandchild'); |
|
1995 | - } |
|
1987 | + case 6: |
|
1988 | + switch ($sex2) { |
|
1989 | + case 'M': |
|
1990 | + return I18N::translate('great ×4 grandson'); |
|
1991 | + case 'F': |
|
1992 | + return I18N::translate('great ×4 granddaughter'); |
|
1993 | + default: |
|
1994 | + return I18N::translate('great ×4 grandchild'); |
|
1995 | + } |
|
1996 | 1996 | |
1997 | - case 7: |
|
1998 | - switch ($sex2) { |
|
1999 | - case 'M': |
|
2000 | - return I18N::translate('great ×5 grandson'); |
|
2001 | - case 'F': |
|
2002 | - return I18N::translate('great ×5 granddaughter'); |
|
2003 | - default: |
|
2004 | - return I18N::translate('great ×5 grandchild'); |
|
2005 | - } |
|
1997 | + case 7: |
|
1998 | + switch ($sex2) { |
|
1999 | + case 'M': |
|
2000 | + return I18N::translate('great ×5 grandson'); |
|
2001 | + case 'F': |
|
2002 | + return I18N::translate('great ×5 granddaughter'); |
|
2003 | + default: |
|
2004 | + return I18N::translate('great ×5 grandchild'); |
|
2005 | + } |
|
2006 | 2006 | |
2007 | - case 8: |
|
2008 | - switch ($sex2) { |
|
2009 | - case 'M': |
|
2010 | - return I18N::translate('great ×6 grandson'); |
|
2011 | - case 'F': |
|
2012 | - return I18N::translate('great ×6 granddaughter'); |
|
2013 | - default: |
|
2014 | - return I18N::translate('great ×6 grandchild'); |
|
2015 | - } |
|
2007 | + case 8: |
|
2008 | + switch ($sex2) { |
|
2009 | + case 'M': |
|
2010 | + return I18N::translate('great ×6 grandson'); |
|
2011 | + case 'F': |
|
2012 | + return I18N::translate('great ×6 granddaughter'); |
|
2013 | + default: |
|
2014 | + return I18N::translate('great ×6 grandchild'); |
|
2015 | + } |
|
2016 | 2016 | |
2017 | - case 9: |
|
2018 | - switch ($sex2) { |
|
2019 | - case 'M': |
|
2020 | - return I18N::translate('great ×7 grandson'); |
|
2021 | - case 'F': |
|
2022 | - return I18N::translate('great ×7 granddaughter'); |
|
2023 | - default: |
|
2024 | - return I18N::translate('great ×7 grandchild'); |
|
2025 | - } |
|
2017 | + case 9: |
|
2018 | + switch ($sex2) { |
|
2019 | + case 'M': |
|
2020 | + return I18N::translate('great ×7 grandson'); |
|
2021 | + case 'F': |
|
2022 | + return I18N::translate('great ×7 granddaughter'); |
|
2023 | + default: |
|
2024 | + return I18N::translate('great ×7 grandchild'); |
|
2025 | + } |
|
2026 | 2026 | |
2027 | - default: |
|
2028 | - // Different languages have different rules for naming generations. |
|
2029 | - // An English great ×12 grandson is a Danish great ×11 grandson. |
|
2030 | - // |
|
2031 | - // Need to find out which languages use which rules. |
|
2032 | - switch (WT_LOCALE) { |
|
2033 | - case 'nn': // Source: Hogne Røed Nilsen |
|
2034 | - case 'nb': |
|
2035 | - case 'da': // Source: Patrick Sorensen |
|
2036 | - switch ($sex2) { |
|
2037 | - case 'M': |
|
2038 | - return I18N::translate('great ×%s grandson', I18N::number($up - 3)); |
|
2039 | - case 'F': |
|
2040 | - return I18N::translate('great ×%s granddaughter', I18N::number($up - 3)); |
|
2041 | 2027 | default: |
2042 | - return I18N::translate('great ×%s grandchild', I18N::number($up - 3)); |
|
2043 | - } |
|
2028 | + // Different languages have different rules for naming generations. |
|
2029 | + // An English great ×12 grandson is a Danish great ×11 grandson. |
|
2030 | + // |
|
2031 | + // Need to find out which languages use which rules. |
|
2032 | + switch (WT_LOCALE) { |
|
2033 | + case 'nn': // Source: Hogne Røed Nilsen |
|
2034 | + case 'nb': |
|
2035 | + case 'da': // Source: Patrick Sorensen |
|
2036 | + switch ($sex2) { |
|
2037 | + case 'M': |
|
2038 | + return I18N::translate('great ×%s grandson', I18N::number($up - 3)); |
|
2039 | + case 'F': |
|
2040 | + return I18N::translate('great ×%s granddaughter', I18N::number($up - 3)); |
|
2041 | + default: |
|
2042 | + return I18N::translate('great ×%s grandchild', I18N::number($up - 3)); |
|
2043 | + } |
|
2044 | 2044 | case 'it': // Source: Michele Locati |
2045 | 2045 | case 'es': // Source: Wes Groleau (adding doesn’t change behavior, but needs to be better researched) |
2046 | 2046 | case 'en_AU': |
@@ -2049,12 +2049,12 @@ discard block |
||
2049 | 2049 | default: |
2050 | 2050 | switch ($sex2) { |
2051 | 2051 | |
2052 | - case 'M': // I18N: if you need a different number for %s, contact the developers, as a code-change is required |
|
2053 | - return I18N::translate('great ×%s grandson', I18N::number($up - 2)); |
|
2054 | - case 'F': |
|
2055 | - return I18N::translate('great ×%s granddaughter', I18N::number($up - 2)); |
|
2056 | - default: |
|
2057 | - return I18N::translate('great ×%s grandchild', I18N::number($up - 2)); |
|
2052 | + case 'M': // I18N: if you need a different number for %s, contact the developers, as a code-change is required |
|
2053 | + return I18N::translate('great ×%s grandson', I18N::number($up - 2)); |
|
2054 | + case 'F': |
|
2055 | + return I18N::translate('great ×%s granddaughter', I18N::number($up - 2)); |
|
2056 | + default: |
|
2057 | + return I18N::translate('great ×%s grandchild', I18N::number($up - 2)); |
|
2058 | 2058 | } |
2059 | 2059 | } |
2060 | 2060 | } |
@@ -2073,68 +2073,68 @@ discard block |
||
2073 | 2073 | // |
2074 | 2074 | // Need to find out which languages use which rules. |
2075 | 2075 | switch (WT_LOCALE) { |
2076 | - case 'pl': // Source: Lukasz Wilenski |
|
2077 | - return self::cousinName($up + $down + 2, $sex2); |
|
2078 | - case 'it': |
|
2079 | - // Source: Michele Locati. See italian_cousins_names.zip |
|
2080 | - // https://webtrees.net/forums/8-translation/1200-great-xn-grandparent?limit=6&start=6 |
|
2081 | - return self::cousinName($up + $down - 3, $sex2); |
|
2082 | - case 'es': |
|
2083 | - // Source: Wes Groleau. See http://UniGen.us/Parentesco.html & http://UniGen.us/Parentesco-D.html |
|
2084 | - if ($down == $up) { |
|
2085 | - return self::cousinName($cousin, $sex2); |
|
2086 | - } elseif ($down < $up) { |
|
2087 | - return self::cousinName2($cousin + 1, $sex2, self::getRelationshipNameFromPath('sib' . $descent, null, null)); |
|
2088 | - } else { |
|
2089 | - switch ($sex2) { |
|
2090 | - case 'M': |
|
2091 | - return self::cousinName2($cousin + 1, $sex2, self::getRelationshipNameFromPath('bro' . $descent, null, null)); |
|
2092 | - case 'F': |
|
2093 | - return self::cousinName2($cousin + 1, $sex2, self::getRelationshipNameFromPath('sis' . $descent, null, null)); |
|
2094 | - default: |
|
2095 | - return self::cousinName2($cousin + 1, $sex2, self::getRelationshipNameFromPath('sib' . $descent, null, null)); |
|
2096 | - } |
|
2076 | + case 'pl': // Source: Lukasz Wilenski |
|
2077 | + return self::cousinName($up + $down + 2, $sex2); |
|
2078 | + case 'it': |
|
2079 | + // Source: Michele Locati. See italian_cousins_names.zip |
|
2080 | + // https://webtrees.net/forums/8-translation/1200-great-xn-grandparent?limit=6&start=6 |
|
2081 | + return self::cousinName($up + $down - 3, $sex2); |
|
2082 | + case 'es': |
|
2083 | + // Source: Wes Groleau. See http://UniGen.us/Parentesco.html & http://UniGen.us/Parentesco-D.html |
|
2084 | + if ($down == $up) { |
|
2085 | + return self::cousinName($cousin, $sex2); |
|
2086 | + } elseif ($down < $up) { |
|
2087 | + return self::cousinName2($cousin + 1, $sex2, self::getRelationshipNameFromPath('sib' . $descent, null, null)); |
|
2088 | + } else { |
|
2089 | + switch ($sex2) { |
|
2090 | + case 'M': |
|
2091 | + return self::cousinName2($cousin + 1, $sex2, self::getRelationshipNameFromPath('bro' . $descent, null, null)); |
|
2092 | + case 'F': |
|
2093 | + return self::cousinName2($cousin + 1, $sex2, self::getRelationshipNameFromPath('sis' . $descent, null, null)); |
|
2094 | + default: |
|
2095 | + return self::cousinName2($cousin + 1, $sex2, self::getRelationshipNameFromPath('sib' . $descent, null, null)); |
|
2096 | + } |
|
2097 | 2097 | } |
2098 | - case 'en_AU': // See: http://en.wikipedia.org/wiki/File:CousinTree.svg |
|
2099 | - case 'en_GB': |
|
2100 | - case 'en_US': |
|
2101 | - default: |
|
2102 | - switch ($removed) { |
|
2103 | - case 0: |
|
2104 | - return self::cousinName($cousin, $sex2); |
|
2105 | - case 1: |
|
2106 | - if ($up > $down) { |
|
2107 | - /* I18N: %s=“fifth cousin”, etc. http://www.ancestry.com/learn/library/article.aspx?article=2856 */ |
|
2108 | - return I18N::translate('%s once removed ascending', self::cousinName($cousin, $sex2)); |
|
2109 | - } else { |
|
2110 | - /* I18N: %s=“fifth cousin”, etc. http://www.ancestry.com/learn/library/article.aspx?article=2856 */ |
|
2111 | - return I18N::translate('%s once removed descending', self::cousinName($cousin, $sex2)); |
|
2112 | - } |
|
2113 | - case 2: |
|
2114 | - if ($up > $down) { |
|
2115 | - /* I18N: %s=“fifth cousin”, etc. */ |
|
2116 | - return I18N::translate('%s twice removed ascending', self::cousinName($cousin, $sex2)); |
|
2117 | - } else { |
|
2118 | - /* I18N: %s=“fifth cousin”, etc. */ |
|
2119 | - return I18N::translate('%s twice removed descending', self::cousinName($cousin, $sex2)); |
|
2120 | - } |
|
2121 | - case 3: |
|
2122 | - if ($up > $down) { |
|
2123 | - /* I18N: %s=“fifth cousin”, etc. */ |
|
2124 | - return I18N::translate('%s three times removed ascending', self::cousinName($cousin, $sex2)); |
|
2125 | - } else { |
|
2126 | - /* I18N: %s=“fifth cousin”, etc. */ |
|
2127 | - return I18N::translate('%s three times removed descending', self::cousinName($cousin, $sex2)); |
|
2128 | - } |
|
2098 | + case 'en_AU': // See: http://en.wikipedia.org/wiki/File:CousinTree.svg |
|
2099 | + case 'en_GB': |
|
2100 | + case 'en_US': |
|
2129 | 2101 | default: |
2130 | - if ($up > $down) { |
|
2131 | - /* I18N: %1$s=“fifth cousin”, etc., %2$s>=4 */ |
|
2132 | - return I18N::translate('%1$s %2$s times removed ascending', self::cousinName($cousin, $sex2), I18N::number($removed)); |
|
2133 | - } else { |
|
2134 | - /* I18N: %1$s=“fifth cousin”, etc., %2$s>=4 */ |
|
2135 | - return I18N::translate('%1$s %2$s times removed descending', self::cousinName($cousin, $sex2), I18N::number($removed)); |
|
2136 | - } |
|
2137 | - } |
|
2102 | + switch ($removed) { |
|
2103 | + case 0: |
|
2104 | + return self::cousinName($cousin, $sex2); |
|
2105 | + case 1: |
|
2106 | + if ($up > $down) { |
|
2107 | + /* I18N: %s=“fifth cousin”, etc. http://www.ancestry.com/learn/library/article.aspx?article=2856 */ |
|
2108 | + return I18N::translate('%s once removed ascending', self::cousinName($cousin, $sex2)); |
|
2109 | + } else { |
|
2110 | + /* I18N: %s=“fifth cousin”, etc. http://www.ancestry.com/learn/library/article.aspx?article=2856 */ |
|
2111 | + return I18N::translate('%s once removed descending', self::cousinName($cousin, $sex2)); |
|
2112 | + } |
|
2113 | + case 2: |
|
2114 | + if ($up > $down) { |
|
2115 | + /* I18N: %s=“fifth cousin”, etc. */ |
|
2116 | + return I18N::translate('%s twice removed ascending', self::cousinName($cousin, $sex2)); |
|
2117 | + } else { |
|
2118 | + /* I18N: %s=“fifth cousin”, etc. */ |
|
2119 | + return I18N::translate('%s twice removed descending', self::cousinName($cousin, $sex2)); |
|
2120 | + } |
|
2121 | + case 3: |
|
2122 | + if ($up > $down) { |
|
2123 | + /* I18N: %s=“fifth cousin”, etc. */ |
|
2124 | + return I18N::translate('%s three times removed ascending', self::cousinName($cousin, $sex2)); |
|
2125 | + } else { |
|
2126 | + /* I18N: %s=“fifth cousin”, etc. */ |
|
2127 | + return I18N::translate('%s three times removed descending', self::cousinName($cousin, $sex2)); |
|
2128 | + } |
|
2129 | + default: |
|
2130 | + if ($up > $down) { |
|
2131 | + /* I18N: %1$s=“fifth cousin”, etc., %2$s>=4 */ |
|
2132 | + return I18N::translate('%1$s %2$s times removed ascending', self::cousinName($cousin, $sex2), I18N::number($removed)); |
|
2133 | + } else { |
|
2134 | + /* I18N: %1$s=“fifth cousin”, etc., %2$s>=4 */ |
|
2135 | + return I18N::translate('%1$s %2$s times removed descending', self::cousinName($cousin, $sex2), I18N::number($removed)); |
|
2136 | + } |
|
2137 | + } |
|
2138 | 2138 | } |
2139 | 2139 | } |
2140 | 2140 |
@@ -59,477 +59,477 @@ discard block |
||
59 | 59 | $tag = strtoupper($tag); // Tags should always be upper case |
60 | 60 | switch ($tag) { |
61 | 61 | // Convert PhpGedView tags to WT |
62 | - case '_PGVU': |
|
63 | - $tag = '_WT_USER'; |
|
64 | - break; |
|
65 | - case '_PGV_OBJS': |
|
66 | - $tag = '_WT_OBJE_SORT'; |
|
67 | - break; |
|
68 | - // Convert FTM-style "TAG_FORMAL_NAME" into "TAG". |
|
69 | - case 'ABBREVIATION': |
|
70 | - $tag = 'ABBR'; |
|
71 | - break; |
|
72 | - case 'ADDRESS': |
|
73 | - $tag = 'ADDR'; |
|
74 | - break; |
|
75 | - case 'ADDRESS1': |
|
76 | - $tag = 'ADR1'; |
|
77 | - break; |
|
78 | - case 'ADDRESS2': |
|
79 | - $tag = 'ADR2'; |
|
80 | - break; |
|
81 | - case 'ADDRESS3': |
|
82 | - $tag = 'ADR3'; |
|
83 | - break; |
|
84 | - case 'ADOPTION': |
|
85 | - $tag = 'ADOP'; |
|
86 | - break; |
|
87 | - case 'ADULT_CHRISTENING': |
|
88 | - $tag = 'CHRA'; |
|
89 | - break; |
|
90 | - case 'AFN': |
|
91 | - // AFN values are upper case |
|
92 | - $data = strtoupper($data); |
|
93 | - break; |
|
94 | - case 'AGENCY': |
|
95 | - $tag = 'AGNC'; |
|
96 | - break; |
|
97 | - case 'ALIAS': |
|
98 | - $tag = 'ALIA'; |
|
99 | - break; |
|
100 | - case 'ANCESTORS': |
|
101 | - $tag = 'ANCE'; |
|
102 | - break; |
|
103 | - case 'ANCES_INTEREST': |
|
104 | - $tag = 'ANCI'; |
|
105 | - break; |
|
106 | - case 'ANNULMENT': |
|
107 | - $tag = 'ANUL'; |
|
108 | - break; |
|
109 | - case 'ASSOCIATES': |
|
110 | - $tag = 'ASSO'; |
|
111 | - break; |
|
112 | - case 'AUTHOR': |
|
113 | - $tag = 'AUTH'; |
|
114 | - break; |
|
115 | - case 'BAPTISM': |
|
116 | - $tag = 'BAPM'; |
|
117 | - break; |
|
118 | - case 'BAPTISM_LDS': |
|
119 | - $tag = 'BAPL'; |
|
120 | - break; |
|
121 | - case 'BAR_MITZVAH': |
|
122 | - $tag = 'BARM'; |
|
123 | - break; |
|
124 | - case 'BAS_MITZVAH': |
|
125 | - $tag = 'BASM'; |
|
126 | - break; |
|
127 | - case 'BIRTH': |
|
128 | - $tag = 'BIRT'; |
|
129 | - break; |
|
130 | - case 'BLESSING': |
|
131 | - $tag = 'BLES'; |
|
132 | - break; |
|
133 | - case 'BURIAL': |
|
134 | - $tag = 'BURI'; |
|
135 | - break; |
|
136 | - case 'CALL_NUMBER': |
|
137 | - $tag = 'CALN'; |
|
138 | - break; |
|
139 | - case 'CASTE': |
|
140 | - $tag = 'CAST'; |
|
141 | - break; |
|
142 | - case 'CAUSE': |
|
143 | - $tag = 'CAUS'; |
|
144 | - break; |
|
145 | - case 'CENSUS': |
|
146 | - $tag = 'CENS'; |
|
147 | - break; |
|
148 | - case 'CHANGE': |
|
149 | - $tag = 'CHAN'; |
|
150 | - break; |
|
151 | - case 'CHARACTER': |
|
152 | - $tag = 'CHAR'; |
|
153 | - break; |
|
154 | - case 'CHILD': |
|
155 | - $tag = 'CHIL'; |
|
156 | - break; |
|
157 | - case 'CHILDREN_COUNT': |
|
158 | - $tag = 'NCHI'; |
|
159 | - break; |
|
160 | - case 'CHRISTENING': |
|
161 | - $tag = 'CHR'; |
|
162 | - break; |
|
163 | - case 'CONCATENATION': |
|
164 | - $tag = 'CONC'; |
|
165 | - break; |
|
166 | - case 'CONFIRMATION': |
|
167 | - $tag = 'CONF'; |
|
168 | - break; |
|
169 | - case 'CONFIRMATION_LDS': |
|
170 | - $tag = 'CONL'; |
|
171 | - break; |
|
172 | - case 'CONTINUED': |
|
173 | - $tag = 'CONT'; |
|
174 | - break; |
|
175 | - case 'COPYRIGHT': |
|
176 | - $tag = 'COPR'; |
|
177 | - break; |
|
178 | - case 'CORPORATE': |
|
179 | - $tag = 'CORP'; |
|
180 | - break; |
|
181 | - case 'COUNTRY': |
|
182 | - $tag = 'CTRY'; |
|
183 | - break; |
|
184 | - case 'CREMATION': |
|
185 | - $tag = 'CREM'; |
|
186 | - break; |
|
187 | - case 'DATE': |
|
188 | - // Preserve text from INT dates |
|
189 | - if (strpos($data, '(') !== false) { |
|
190 | - list($date, $text) = explode('(', $data, 2); |
|
191 | - $text = ' (' . $text; |
|
192 | - } else { |
|
193 | - $date = $data; |
|
194 | - $text = ''; |
|
195 | - } |
|
196 | - // Capitals |
|
197 | - $date = strtoupper($date); |
|
198 | - // Temporarily add leading/trailing spaces, to allow efficient matching below |
|
199 | - $date = " {$date} "; |
|
200 | - // Ensure space digits and letters |
|
201 | - $date = preg_replace('/([A-Z])(\d)/', '$1 $2', $date); |
|
202 | - $date = preg_replace('/(\d)([A-Z])/', '$1 $2', $date); |
|
203 | - // Ensure space before/after calendar escapes |
|
204 | - $date = preg_replace('/@#[^@]+@/', ' $0 ', $date); |
|
205 | - // "BET." => "BET" |
|
206 | - $date = preg_replace('/(\w\w)\./', '$1', $date); |
|
207 | - // "CIR" => "ABT" |
|
208 | - $date = str_replace(' CIR ', ' ABT ', $date); |
|
209 | - $date = str_replace(' APX ', ' ABT ', $date); |
|
210 | - // B.C. => BC (temporarily, to allow easier handling of ".") |
|
211 | - $date = str_replace(' B.C. ', ' BC ', $date); |
|
212 | - // "BET X - Y " => "BET X AND Y" |
|
213 | - $date = preg_replace('/^(.* BET .+) - (.+)/', '$1 AND $2', $date); |
|
214 | - $date = preg_replace('/^(.* FROM .+) - (.+)/', '$1 TO $2', $date); |
|
215 | - // "@#ESC@ FROM X TO Y" => "FROM @#ESC@ X TO @#ESC@ Y" |
|
216 | - $date = preg_replace('/^ +(@#[^@]+@) +FROM +(.+) +TO +(.+)/', ' FROM $1 $2 TO $1 $3', $date); |
|
217 | - $date = preg_replace('/^ +(@#[^@]+@) +BET +(.+) +AND +(.+)/', ' BET $1 $2 AND $1 $3', $date); |
|
218 | - // "@#ESC@ AFT X" => "AFT @#ESC@ X" |
|
219 | - $date = preg_replace('/^ +(@#[^@]+@) +(FROM|BET|TO|AND|BEF|AFT|CAL|EST|INT|ABT) +(.+)/', ' $2 $1 $3', $date); |
|
220 | - // Ignore any remaining punctuation, e.g. "14-MAY, 1900" => "14 MAY 1900" |
|
221 | - // (don't change "/" - it is used in NS/OS dates) |
|
222 | - $date = preg_replace('/[.,:;-]/', ' ', $date); |
|
223 | - // BC => B.C. |
|
224 | - $date = str_replace(' BC ', ' B.C. ', $date); |
|
225 | - // Append the "INT" text |
|
226 | - $data = $date . $text; |
|
227 | - break; |
|
228 | - case 'DEATH': |
|
229 | - $tag = 'DEAT'; |
|
230 | - break; |
|
231 | - case '_DEATH_OF_SPOUSE': |
|
232 | - $tag = '_DETS'; |
|
233 | - break; |
|
234 | - case '_DEGREE': |
|
235 | - $tag = '_DEG'; |
|
236 | - break; |
|
237 | - case 'DESCENDANTS': |
|
238 | - $tag = 'DESC'; |
|
239 | - break; |
|
240 | - case 'DESCENDANT_INT': |
|
241 | - $tag = 'DESI'; |
|
242 | - break; |
|
243 | - case 'DESTINATION': |
|
244 | - $tag = 'DEST'; |
|
245 | - break; |
|
246 | - case 'DIVORCE': |
|
247 | - $tag = 'DIV'; |
|
248 | - break; |
|
249 | - case 'DIVORCE_FILED': |
|
250 | - $tag = 'DIVF'; |
|
251 | - break; |
|
252 | - case 'EDUCATION': |
|
253 | - $tag = 'EDUC'; |
|
254 | - break; |
|
255 | - case 'EMIGRATION': |
|
256 | - $tag = 'EMIG'; |
|
257 | - break; |
|
258 | - case 'ENDOWMENT': |
|
259 | - $tag = 'ENDL'; |
|
260 | - break; |
|
261 | - case 'ENGAGEMENT': |
|
262 | - $tag = 'ENGA'; |
|
263 | - break; |
|
264 | - case 'EVENT': |
|
265 | - $tag = 'EVEN'; |
|
266 | - break; |
|
267 | - case 'FACSIMILE': |
|
268 | - $tag = 'FAX'; |
|
269 | - break; |
|
270 | - case 'FAMILY': |
|
271 | - $tag = 'FAM'; |
|
272 | - break; |
|
273 | - case 'FAMILY_CHILD': |
|
274 | - $tag = 'FAMC'; |
|
275 | - break; |
|
276 | - case 'FAMILY_FILE': |
|
277 | - $tag = 'FAMF'; |
|
278 | - break; |
|
279 | - case 'FAMILY_SPOUSE': |
|
280 | - $tag = 'FAMS'; |
|
281 | - break; |
|
282 | - case 'FIRST_COMMUNION': |
|
283 | - $tag = 'FCOM'; |
|
284 | - break; |
|
285 | - case '_FILE': |
|
286 | - $tag = 'FILE'; |
|
287 | - break; |
|
288 | - case 'FORMAT': |
|
289 | - $tag = 'FORM'; |
|
290 | - case 'FORM': |
|
291 | - // Consistent commas |
|
292 | - $data = preg_replace('/ *, */', ', ', $data); |
|
293 | - break; |
|
294 | - case 'GEDCOM': |
|
295 | - $tag = 'GEDC'; |
|
296 | - break; |
|
297 | - case 'GIVEN_NAME': |
|
298 | - $tag = 'GIVN'; |
|
299 | - break; |
|
300 | - case 'GRADUATION': |
|
301 | - $tag = 'GRAD'; |
|
302 | - break; |
|
303 | - case 'HEADER': |
|
304 | - $tag = 'HEAD'; |
|
305 | - case 'HEAD': |
|
306 | - // HEAD records don't have an XREF or DATA |
|
307 | - if ($level == '0') { |
|
308 | - $xref = ''; |
|
309 | - $data = ''; |
|
310 | - } |
|
311 | - break; |
|
312 | - case 'HUSBAND': |
|
313 | - $tag = 'HUSB'; |
|
314 | - break; |
|
315 | - case 'IDENT_NUMBER': |
|
316 | - $tag = 'IDNO'; |
|
317 | - break; |
|
318 | - case 'IMMIGRATION': |
|
319 | - $tag = 'IMMI'; |
|
320 | - break; |
|
321 | - case 'INDIVIDUAL': |
|
322 | - $tag = 'INDI'; |
|
323 | - break; |
|
324 | - case 'LANGUAGE': |
|
325 | - $tag = 'LANG'; |
|
326 | - break; |
|
327 | - case 'LATITUDE': |
|
328 | - $tag = 'LATI'; |
|
329 | - break; |
|
330 | - case 'LONGITUDE': |
|
331 | - $tag = 'LONG'; |
|
332 | - break; |
|
333 | - case 'MARRIAGE': |
|
334 | - $tag = 'MARR'; |
|
335 | - break; |
|
336 | - case 'MARRIAGE_BANN': |
|
337 | - $tag = 'MARB'; |
|
338 | - break; |
|
339 | - case 'MARRIAGE_COUNT': |
|
340 | - $tag = 'NMR'; |
|
341 | - break; |
|
342 | - case 'MARRIAGE_CONTRACT': |
|
343 | - $tag = 'MARC'; |
|
344 | - break; |
|
345 | - case 'MARRIAGE_LICENSE': |
|
346 | - $tag = 'MARL'; |
|
347 | - break; |
|
348 | - case 'MARRIAGE_SETTLEMENT': |
|
349 | - $tag = 'MARS'; |
|
350 | - break; |
|
351 | - case 'MEDIA': |
|
352 | - $tag = 'MEDI'; |
|
353 | - break; |
|
354 | - case '_MEDICAL': |
|
355 | - $tag = '_MDCL'; |
|
356 | - break; |
|
357 | - case '_MILITARY_SERVICE': |
|
358 | - $tag = '_MILT'; |
|
359 | - break; |
|
360 | - case 'NAME': |
|
361 | - // Tidy up whitespace |
|
362 | - $data = preg_replace('/ +/', ' ', trim($data)); |
|
363 | - break; |
|
364 | - case 'NAME_PREFIX': |
|
365 | - $tag = 'NPFX'; |
|
366 | - break; |
|
367 | - case 'NAME_SUFFIX': |
|
368 | - $tag = 'NSFX'; |
|
369 | - break; |
|
370 | - case 'NATIONALITY': |
|
371 | - $tag = 'NATI'; |
|
372 | - break; |
|
373 | - case 'NATURALIZATION': |
|
374 | - $tag = 'NATU'; |
|
375 | - break; |
|
376 | - case 'NICKNAME': |
|
377 | - $tag = 'NICK'; |
|
378 | - break; |
|
379 | - case 'OBJECT': |
|
380 | - $tag = 'OBJE'; |
|
381 | - break; |
|
382 | - case 'OCCUPATION': |
|
383 | - $tag = 'OCCU'; |
|
384 | - break; |
|
385 | - case 'ORDINANCE': |
|
386 | - $tag = 'ORDI'; |
|
387 | - break; |
|
388 | - case 'ORDINATION': |
|
389 | - $tag = 'ORDN'; |
|
390 | - break; |
|
391 | - case 'PEDIGREE': |
|
392 | - $tag = 'PEDI'; |
|
393 | - case 'PEDI': |
|
394 | - // PEDI values are lower case |
|
395 | - $data = strtolower($data); |
|
396 | - break; |
|
397 | - case 'PHONE': |
|
398 | - $tag = 'PHON'; |
|
399 | - break; |
|
400 | - case 'PHONETIC': |
|
401 | - $tag = 'FONE'; |
|
402 | - break; |
|
403 | - case 'PHY_DESCRIPTION': |
|
404 | - $tag = 'DSCR'; |
|
405 | - break; |
|
406 | - case 'PLACE': |
|
407 | - $tag = 'PLAC'; |
|
408 | - case 'PLAC': |
|
409 | - // Consistent commas |
|
410 | - $data = preg_replace('/ *(،|,) */', ', ', $data); |
|
411 | - // The Master Genealogist stores LAT/LONG data in the PLAC field, e.g. Pennsylvania, USA, 395945N0751013W |
|
412 | - if (preg_match('/(.*), (\d\d)(\d\d)(\d\d)([NS])(\d\d\d)(\d\d)(\d\d)([EW])$/', $data, $match)) { |
|
413 | - $data = |
|
414 | - $match[1] . "\n" . |
|
415 | - ($level + 1) . " MAP\n" . |
|
416 | - ($level + 2) . " LATI " . ($match[5] . (round($match[2] + ($match[3] / 60) + ($match[4] / 3600), 4))) . "\n" . |
|
417 | - ($level + 2) . " LONG " . ($match[9] . (round($match[6] + ($match[7] / 60) + ($match[8] / 3600), 4))); |
|
418 | - } |
|
419 | - break; |
|
420 | - case 'POSTAL_CODE': |
|
421 | - $tag = 'POST'; |
|
422 | - break; |
|
423 | - case 'PROBATE': |
|
424 | - $tag = 'PROB'; |
|
425 | - break; |
|
426 | - case 'PROPERTY': |
|
427 | - $tag = 'PROP'; |
|
428 | - break; |
|
429 | - case 'PUBLICATION': |
|
430 | - $tag = 'PUBL'; |
|
431 | - break; |
|
432 | - case 'QUALITY_OF_DATA': |
|
433 | - $tag = 'QUAL'; |
|
434 | - break; |
|
435 | - case 'REC_FILE_NUMBER': |
|
436 | - $tag = 'RFN'; |
|
437 | - break; |
|
438 | - case 'REC_ID_NUMBER': |
|
439 | - $tag = 'RIN'; |
|
440 | - break; |
|
441 | - case 'REFERENCE': |
|
442 | - $tag = 'REFN'; |
|
443 | - break; |
|
444 | - case 'RELATIONSHIP': |
|
445 | - $tag = 'RELA'; |
|
446 | - break; |
|
447 | - case 'RELIGION': |
|
448 | - $tag = 'RELI'; |
|
449 | - break; |
|
450 | - case 'REPOSITORY': |
|
451 | - $tag = 'REPO'; |
|
452 | - break; |
|
453 | - case 'RESIDENCE': |
|
454 | - $tag = 'RESI'; |
|
455 | - break; |
|
456 | - case 'RESTRICTION': |
|
457 | - $tag = 'RESN'; |
|
458 | - case 'RESN': |
|
459 | - // RESN values are lower case (confidential, privacy, locked, none) |
|
460 | - $data = strtolower($data); |
|
461 | - if ($data == 'invisible') { |
|
462 | - $data = 'confidential'; // From old versions of Legacy. |
|
463 | - } |
|
464 | - break; |
|
465 | - case 'RETIREMENT': |
|
466 | - $tag = 'RETI'; |
|
467 | - break; |
|
468 | - case 'ROMANIZED': |
|
469 | - $tag = 'ROMN'; |
|
470 | - break; |
|
471 | - case 'SEALING_CHILD': |
|
472 | - $tag = 'SLGC'; |
|
473 | - break; |
|
474 | - case 'SEALING_SPOUSE': |
|
475 | - $tag = 'SLGS'; |
|
476 | - break; |
|
477 | - case 'SOC_SEC_NUMBER': |
|
478 | - $tag = 'SSN'; |
|
479 | - break; |
|
480 | - case 'SEX': |
|
481 | - $data = strtoupper($data); |
|
482 | - break; |
|
483 | - case 'SOURCE': |
|
484 | - $tag = 'SOUR'; |
|
485 | - break; |
|
486 | - case 'STATE': |
|
487 | - $tag = 'STAE'; |
|
488 | - break; |
|
489 | - case 'STATUS': |
|
490 | - $tag = 'STAT'; |
|
491 | - case 'STAT': |
|
492 | - if ($data == 'CANCELLED') { |
|
493 | - // PhpGedView mis-spells this tag - correct it. |
|
494 | - $data = 'CANCELED'; |
|
495 | - } |
|
496 | - break; |
|
497 | - case 'SUBMISSION': |
|
498 | - $tag = 'SUBN'; |
|
499 | - break; |
|
500 | - case 'SUBMITTER': |
|
501 | - $tag = 'SUBM'; |
|
502 | - break; |
|
503 | - case 'SURNAME': |
|
504 | - $tag = 'SURN'; |
|
505 | - break; |
|
506 | - case 'SURN_PREFIX': |
|
507 | - $tag = 'SPFX'; |
|
508 | - break; |
|
509 | - case 'TEMPLE': |
|
510 | - $tag = 'TEMP'; |
|
511 | - case 'TEMP': |
|
512 | - // Temple codes are upper case |
|
513 | - $data = strtoupper($data); |
|
514 | - break; |
|
515 | - case 'TITLE': |
|
516 | - $tag = 'TITL'; |
|
517 | - break; |
|
518 | - case 'TRAILER': |
|
519 | - $tag = 'TRLR'; |
|
520 | - case 'TRLR': |
|
521 | - // TRLR records don't have an XREF or DATA |
|
522 | - if ($level == '0') { |
|
523 | - $xref = ''; |
|
524 | - $data = ''; |
|
525 | - } |
|
526 | - break; |
|
527 | - case 'VERSION': |
|
528 | - $tag = 'VERS'; |
|
529 | - break; |
|
530 | - case 'WEB': |
|
531 | - $tag = 'WWW'; |
|
532 | - break; |
|
62 | + case '_PGVU': |
|
63 | + $tag = '_WT_USER'; |
|
64 | + break; |
|
65 | + case '_PGV_OBJS': |
|
66 | + $tag = '_WT_OBJE_SORT'; |
|
67 | + break; |
|
68 | + // Convert FTM-style "TAG_FORMAL_NAME" into "TAG". |
|
69 | + case 'ABBREVIATION': |
|
70 | + $tag = 'ABBR'; |
|
71 | + break; |
|
72 | + case 'ADDRESS': |
|
73 | + $tag = 'ADDR'; |
|
74 | + break; |
|
75 | + case 'ADDRESS1': |
|
76 | + $tag = 'ADR1'; |
|
77 | + break; |
|
78 | + case 'ADDRESS2': |
|
79 | + $tag = 'ADR2'; |
|
80 | + break; |
|
81 | + case 'ADDRESS3': |
|
82 | + $tag = 'ADR3'; |
|
83 | + break; |
|
84 | + case 'ADOPTION': |
|
85 | + $tag = 'ADOP'; |
|
86 | + break; |
|
87 | + case 'ADULT_CHRISTENING': |
|
88 | + $tag = 'CHRA'; |
|
89 | + break; |
|
90 | + case 'AFN': |
|
91 | + // AFN values are upper case |
|
92 | + $data = strtoupper($data); |
|
93 | + break; |
|
94 | + case 'AGENCY': |
|
95 | + $tag = 'AGNC'; |
|
96 | + break; |
|
97 | + case 'ALIAS': |
|
98 | + $tag = 'ALIA'; |
|
99 | + break; |
|
100 | + case 'ANCESTORS': |
|
101 | + $tag = 'ANCE'; |
|
102 | + break; |
|
103 | + case 'ANCES_INTEREST': |
|
104 | + $tag = 'ANCI'; |
|
105 | + break; |
|
106 | + case 'ANNULMENT': |
|
107 | + $tag = 'ANUL'; |
|
108 | + break; |
|
109 | + case 'ASSOCIATES': |
|
110 | + $tag = 'ASSO'; |
|
111 | + break; |
|
112 | + case 'AUTHOR': |
|
113 | + $tag = 'AUTH'; |
|
114 | + break; |
|
115 | + case 'BAPTISM': |
|
116 | + $tag = 'BAPM'; |
|
117 | + break; |
|
118 | + case 'BAPTISM_LDS': |
|
119 | + $tag = 'BAPL'; |
|
120 | + break; |
|
121 | + case 'BAR_MITZVAH': |
|
122 | + $tag = 'BARM'; |
|
123 | + break; |
|
124 | + case 'BAS_MITZVAH': |
|
125 | + $tag = 'BASM'; |
|
126 | + break; |
|
127 | + case 'BIRTH': |
|
128 | + $tag = 'BIRT'; |
|
129 | + break; |
|
130 | + case 'BLESSING': |
|
131 | + $tag = 'BLES'; |
|
132 | + break; |
|
133 | + case 'BURIAL': |
|
134 | + $tag = 'BURI'; |
|
135 | + break; |
|
136 | + case 'CALL_NUMBER': |
|
137 | + $tag = 'CALN'; |
|
138 | + break; |
|
139 | + case 'CASTE': |
|
140 | + $tag = 'CAST'; |
|
141 | + break; |
|
142 | + case 'CAUSE': |
|
143 | + $tag = 'CAUS'; |
|
144 | + break; |
|
145 | + case 'CENSUS': |
|
146 | + $tag = 'CENS'; |
|
147 | + break; |
|
148 | + case 'CHANGE': |
|
149 | + $tag = 'CHAN'; |
|
150 | + break; |
|
151 | + case 'CHARACTER': |
|
152 | + $tag = 'CHAR'; |
|
153 | + break; |
|
154 | + case 'CHILD': |
|
155 | + $tag = 'CHIL'; |
|
156 | + break; |
|
157 | + case 'CHILDREN_COUNT': |
|
158 | + $tag = 'NCHI'; |
|
159 | + break; |
|
160 | + case 'CHRISTENING': |
|
161 | + $tag = 'CHR'; |
|
162 | + break; |
|
163 | + case 'CONCATENATION': |
|
164 | + $tag = 'CONC'; |
|
165 | + break; |
|
166 | + case 'CONFIRMATION': |
|
167 | + $tag = 'CONF'; |
|
168 | + break; |
|
169 | + case 'CONFIRMATION_LDS': |
|
170 | + $tag = 'CONL'; |
|
171 | + break; |
|
172 | + case 'CONTINUED': |
|
173 | + $tag = 'CONT'; |
|
174 | + break; |
|
175 | + case 'COPYRIGHT': |
|
176 | + $tag = 'COPR'; |
|
177 | + break; |
|
178 | + case 'CORPORATE': |
|
179 | + $tag = 'CORP'; |
|
180 | + break; |
|
181 | + case 'COUNTRY': |
|
182 | + $tag = 'CTRY'; |
|
183 | + break; |
|
184 | + case 'CREMATION': |
|
185 | + $tag = 'CREM'; |
|
186 | + break; |
|
187 | + case 'DATE': |
|
188 | + // Preserve text from INT dates |
|
189 | + if (strpos($data, '(') !== false) { |
|
190 | + list($date, $text) = explode('(', $data, 2); |
|
191 | + $text = ' (' . $text; |
|
192 | + } else { |
|
193 | + $date = $data; |
|
194 | + $text = ''; |
|
195 | + } |
|
196 | + // Capitals |
|
197 | + $date = strtoupper($date); |
|
198 | + // Temporarily add leading/trailing spaces, to allow efficient matching below |
|
199 | + $date = " {$date} "; |
|
200 | + // Ensure space digits and letters |
|
201 | + $date = preg_replace('/([A-Z])(\d)/', '$1 $2', $date); |
|
202 | + $date = preg_replace('/(\d)([A-Z])/', '$1 $2', $date); |
|
203 | + // Ensure space before/after calendar escapes |
|
204 | + $date = preg_replace('/@#[^@]+@/', ' $0 ', $date); |
|
205 | + // "BET." => "BET" |
|
206 | + $date = preg_replace('/(\w\w)\./', '$1', $date); |
|
207 | + // "CIR" => "ABT" |
|
208 | + $date = str_replace(' CIR ', ' ABT ', $date); |
|
209 | + $date = str_replace(' APX ', ' ABT ', $date); |
|
210 | + // B.C. => BC (temporarily, to allow easier handling of ".") |
|
211 | + $date = str_replace(' B.C. ', ' BC ', $date); |
|
212 | + // "BET X - Y " => "BET X AND Y" |
|
213 | + $date = preg_replace('/^(.* BET .+) - (.+)/', '$1 AND $2', $date); |
|
214 | + $date = preg_replace('/^(.* FROM .+) - (.+)/', '$1 TO $2', $date); |
|
215 | + // "@#ESC@ FROM X TO Y" => "FROM @#ESC@ X TO @#ESC@ Y" |
|
216 | + $date = preg_replace('/^ +(@#[^@]+@) +FROM +(.+) +TO +(.+)/', ' FROM $1 $2 TO $1 $3', $date); |
|
217 | + $date = preg_replace('/^ +(@#[^@]+@) +BET +(.+) +AND +(.+)/', ' BET $1 $2 AND $1 $3', $date); |
|
218 | + // "@#ESC@ AFT X" => "AFT @#ESC@ X" |
|
219 | + $date = preg_replace('/^ +(@#[^@]+@) +(FROM|BET|TO|AND|BEF|AFT|CAL|EST|INT|ABT) +(.+)/', ' $2 $1 $3', $date); |
|
220 | + // Ignore any remaining punctuation, e.g. "14-MAY, 1900" => "14 MAY 1900" |
|
221 | + // (don't change "/" - it is used in NS/OS dates) |
|
222 | + $date = preg_replace('/[.,:;-]/', ' ', $date); |
|
223 | + // BC => B.C. |
|
224 | + $date = str_replace(' BC ', ' B.C. ', $date); |
|
225 | + // Append the "INT" text |
|
226 | + $data = $date . $text; |
|
227 | + break; |
|
228 | + case 'DEATH': |
|
229 | + $tag = 'DEAT'; |
|
230 | + break; |
|
231 | + case '_DEATH_OF_SPOUSE': |
|
232 | + $tag = '_DETS'; |
|
233 | + break; |
|
234 | + case '_DEGREE': |
|
235 | + $tag = '_DEG'; |
|
236 | + break; |
|
237 | + case 'DESCENDANTS': |
|
238 | + $tag = 'DESC'; |
|
239 | + break; |
|
240 | + case 'DESCENDANT_INT': |
|
241 | + $tag = 'DESI'; |
|
242 | + break; |
|
243 | + case 'DESTINATION': |
|
244 | + $tag = 'DEST'; |
|
245 | + break; |
|
246 | + case 'DIVORCE': |
|
247 | + $tag = 'DIV'; |
|
248 | + break; |
|
249 | + case 'DIVORCE_FILED': |
|
250 | + $tag = 'DIVF'; |
|
251 | + break; |
|
252 | + case 'EDUCATION': |
|
253 | + $tag = 'EDUC'; |
|
254 | + break; |
|
255 | + case 'EMIGRATION': |
|
256 | + $tag = 'EMIG'; |
|
257 | + break; |
|
258 | + case 'ENDOWMENT': |
|
259 | + $tag = 'ENDL'; |
|
260 | + break; |
|
261 | + case 'ENGAGEMENT': |
|
262 | + $tag = 'ENGA'; |
|
263 | + break; |
|
264 | + case 'EVENT': |
|
265 | + $tag = 'EVEN'; |
|
266 | + break; |
|
267 | + case 'FACSIMILE': |
|
268 | + $tag = 'FAX'; |
|
269 | + break; |
|
270 | + case 'FAMILY': |
|
271 | + $tag = 'FAM'; |
|
272 | + break; |
|
273 | + case 'FAMILY_CHILD': |
|
274 | + $tag = 'FAMC'; |
|
275 | + break; |
|
276 | + case 'FAMILY_FILE': |
|
277 | + $tag = 'FAMF'; |
|
278 | + break; |
|
279 | + case 'FAMILY_SPOUSE': |
|
280 | + $tag = 'FAMS'; |
|
281 | + break; |
|
282 | + case 'FIRST_COMMUNION': |
|
283 | + $tag = 'FCOM'; |
|
284 | + break; |
|
285 | + case '_FILE': |
|
286 | + $tag = 'FILE'; |
|
287 | + break; |
|
288 | + case 'FORMAT': |
|
289 | + $tag = 'FORM'; |
|
290 | + case 'FORM': |
|
291 | + // Consistent commas |
|
292 | + $data = preg_replace('/ *, */', ', ', $data); |
|
293 | + break; |
|
294 | + case 'GEDCOM': |
|
295 | + $tag = 'GEDC'; |
|
296 | + break; |
|
297 | + case 'GIVEN_NAME': |
|
298 | + $tag = 'GIVN'; |
|
299 | + break; |
|
300 | + case 'GRADUATION': |
|
301 | + $tag = 'GRAD'; |
|
302 | + break; |
|
303 | + case 'HEADER': |
|
304 | + $tag = 'HEAD'; |
|
305 | + case 'HEAD': |
|
306 | + // HEAD records don't have an XREF or DATA |
|
307 | + if ($level == '0') { |
|
308 | + $xref = ''; |
|
309 | + $data = ''; |
|
310 | + } |
|
311 | + break; |
|
312 | + case 'HUSBAND': |
|
313 | + $tag = 'HUSB'; |
|
314 | + break; |
|
315 | + case 'IDENT_NUMBER': |
|
316 | + $tag = 'IDNO'; |
|
317 | + break; |
|
318 | + case 'IMMIGRATION': |
|
319 | + $tag = 'IMMI'; |
|
320 | + break; |
|
321 | + case 'INDIVIDUAL': |
|
322 | + $tag = 'INDI'; |
|
323 | + break; |
|
324 | + case 'LANGUAGE': |
|
325 | + $tag = 'LANG'; |
|
326 | + break; |
|
327 | + case 'LATITUDE': |
|
328 | + $tag = 'LATI'; |
|
329 | + break; |
|
330 | + case 'LONGITUDE': |
|
331 | + $tag = 'LONG'; |
|
332 | + break; |
|
333 | + case 'MARRIAGE': |
|
334 | + $tag = 'MARR'; |
|
335 | + break; |
|
336 | + case 'MARRIAGE_BANN': |
|
337 | + $tag = 'MARB'; |
|
338 | + break; |
|
339 | + case 'MARRIAGE_COUNT': |
|
340 | + $tag = 'NMR'; |
|
341 | + break; |
|
342 | + case 'MARRIAGE_CONTRACT': |
|
343 | + $tag = 'MARC'; |
|
344 | + break; |
|
345 | + case 'MARRIAGE_LICENSE': |
|
346 | + $tag = 'MARL'; |
|
347 | + break; |
|
348 | + case 'MARRIAGE_SETTLEMENT': |
|
349 | + $tag = 'MARS'; |
|
350 | + break; |
|
351 | + case 'MEDIA': |
|
352 | + $tag = 'MEDI'; |
|
353 | + break; |
|
354 | + case '_MEDICAL': |
|
355 | + $tag = '_MDCL'; |
|
356 | + break; |
|
357 | + case '_MILITARY_SERVICE': |
|
358 | + $tag = '_MILT'; |
|
359 | + break; |
|
360 | + case 'NAME': |
|
361 | + // Tidy up whitespace |
|
362 | + $data = preg_replace('/ +/', ' ', trim($data)); |
|
363 | + break; |
|
364 | + case 'NAME_PREFIX': |
|
365 | + $tag = 'NPFX'; |
|
366 | + break; |
|
367 | + case 'NAME_SUFFIX': |
|
368 | + $tag = 'NSFX'; |
|
369 | + break; |
|
370 | + case 'NATIONALITY': |
|
371 | + $tag = 'NATI'; |
|
372 | + break; |
|
373 | + case 'NATURALIZATION': |
|
374 | + $tag = 'NATU'; |
|
375 | + break; |
|
376 | + case 'NICKNAME': |
|
377 | + $tag = 'NICK'; |
|
378 | + break; |
|
379 | + case 'OBJECT': |
|
380 | + $tag = 'OBJE'; |
|
381 | + break; |
|
382 | + case 'OCCUPATION': |
|
383 | + $tag = 'OCCU'; |
|
384 | + break; |
|
385 | + case 'ORDINANCE': |
|
386 | + $tag = 'ORDI'; |
|
387 | + break; |
|
388 | + case 'ORDINATION': |
|
389 | + $tag = 'ORDN'; |
|
390 | + break; |
|
391 | + case 'PEDIGREE': |
|
392 | + $tag = 'PEDI'; |
|
393 | + case 'PEDI': |
|
394 | + // PEDI values are lower case |
|
395 | + $data = strtolower($data); |
|
396 | + break; |
|
397 | + case 'PHONE': |
|
398 | + $tag = 'PHON'; |
|
399 | + break; |
|
400 | + case 'PHONETIC': |
|
401 | + $tag = 'FONE'; |
|
402 | + break; |
|
403 | + case 'PHY_DESCRIPTION': |
|
404 | + $tag = 'DSCR'; |
|
405 | + break; |
|
406 | + case 'PLACE': |
|
407 | + $tag = 'PLAC'; |
|
408 | + case 'PLAC': |
|
409 | + // Consistent commas |
|
410 | + $data = preg_replace('/ *(،|,) */', ', ', $data); |
|
411 | + // The Master Genealogist stores LAT/LONG data in the PLAC field, e.g. Pennsylvania, USA, 395945N0751013W |
|
412 | + if (preg_match('/(.*), (\d\d)(\d\d)(\d\d)([NS])(\d\d\d)(\d\d)(\d\d)([EW])$/', $data, $match)) { |
|
413 | + $data = |
|
414 | + $match[1] . "\n" . |
|
415 | + ($level + 1) . " MAP\n" . |
|
416 | + ($level + 2) . " LATI " . ($match[5] . (round($match[2] + ($match[3] / 60) + ($match[4] / 3600), 4))) . "\n" . |
|
417 | + ($level + 2) . " LONG " . ($match[9] . (round($match[6] + ($match[7] / 60) + ($match[8] / 3600), 4))); |
|
418 | + } |
|
419 | + break; |
|
420 | + case 'POSTAL_CODE': |
|
421 | + $tag = 'POST'; |
|
422 | + break; |
|
423 | + case 'PROBATE': |
|
424 | + $tag = 'PROB'; |
|
425 | + break; |
|
426 | + case 'PROPERTY': |
|
427 | + $tag = 'PROP'; |
|
428 | + break; |
|
429 | + case 'PUBLICATION': |
|
430 | + $tag = 'PUBL'; |
|
431 | + break; |
|
432 | + case 'QUALITY_OF_DATA': |
|
433 | + $tag = 'QUAL'; |
|
434 | + break; |
|
435 | + case 'REC_FILE_NUMBER': |
|
436 | + $tag = 'RFN'; |
|
437 | + break; |
|
438 | + case 'REC_ID_NUMBER': |
|
439 | + $tag = 'RIN'; |
|
440 | + break; |
|
441 | + case 'REFERENCE': |
|
442 | + $tag = 'REFN'; |
|
443 | + break; |
|
444 | + case 'RELATIONSHIP': |
|
445 | + $tag = 'RELA'; |
|
446 | + break; |
|
447 | + case 'RELIGION': |
|
448 | + $tag = 'RELI'; |
|
449 | + break; |
|
450 | + case 'REPOSITORY': |
|
451 | + $tag = 'REPO'; |
|
452 | + break; |
|
453 | + case 'RESIDENCE': |
|
454 | + $tag = 'RESI'; |
|
455 | + break; |
|
456 | + case 'RESTRICTION': |
|
457 | + $tag = 'RESN'; |
|
458 | + case 'RESN': |
|
459 | + // RESN values are lower case (confidential, privacy, locked, none) |
|
460 | + $data = strtolower($data); |
|
461 | + if ($data == 'invisible') { |
|
462 | + $data = 'confidential'; // From old versions of Legacy. |
|
463 | + } |
|
464 | + break; |
|
465 | + case 'RETIREMENT': |
|
466 | + $tag = 'RETI'; |
|
467 | + break; |
|
468 | + case 'ROMANIZED': |
|
469 | + $tag = 'ROMN'; |
|
470 | + break; |
|
471 | + case 'SEALING_CHILD': |
|
472 | + $tag = 'SLGC'; |
|
473 | + break; |
|
474 | + case 'SEALING_SPOUSE': |
|
475 | + $tag = 'SLGS'; |
|
476 | + break; |
|
477 | + case 'SOC_SEC_NUMBER': |
|
478 | + $tag = 'SSN'; |
|
479 | + break; |
|
480 | + case 'SEX': |
|
481 | + $data = strtoupper($data); |
|
482 | + break; |
|
483 | + case 'SOURCE': |
|
484 | + $tag = 'SOUR'; |
|
485 | + break; |
|
486 | + case 'STATE': |
|
487 | + $tag = 'STAE'; |
|
488 | + break; |
|
489 | + case 'STATUS': |
|
490 | + $tag = 'STAT'; |
|
491 | + case 'STAT': |
|
492 | + if ($data == 'CANCELLED') { |
|
493 | + // PhpGedView mis-spells this tag - correct it. |
|
494 | + $data = 'CANCELED'; |
|
495 | + } |
|
496 | + break; |
|
497 | + case 'SUBMISSION': |
|
498 | + $tag = 'SUBN'; |
|
499 | + break; |
|
500 | + case 'SUBMITTER': |
|
501 | + $tag = 'SUBM'; |
|
502 | + break; |
|
503 | + case 'SURNAME': |
|
504 | + $tag = 'SURN'; |
|
505 | + break; |
|
506 | + case 'SURN_PREFIX': |
|
507 | + $tag = 'SPFX'; |
|
508 | + break; |
|
509 | + case 'TEMPLE': |
|
510 | + $tag = 'TEMP'; |
|
511 | + case 'TEMP': |
|
512 | + // Temple codes are upper case |
|
513 | + $data = strtoupper($data); |
|
514 | + break; |
|
515 | + case 'TITLE': |
|
516 | + $tag = 'TITL'; |
|
517 | + break; |
|
518 | + case 'TRAILER': |
|
519 | + $tag = 'TRLR'; |
|
520 | + case 'TRLR': |
|
521 | + // TRLR records don't have an XREF or DATA |
|
522 | + if ($level == '0') { |
|
523 | + $xref = ''; |
|
524 | + $data = ''; |
|
525 | + } |
|
526 | + break; |
|
527 | + case 'VERSION': |
|
528 | + $tag = 'VERS'; |
|
529 | + break; |
|
530 | + case 'WEB': |
|
531 | + $tag = 'WWW'; |
|
532 | + break; |
|
533 | 533 | } |
534 | 534 | // Suppress "Y", for facts/events with a DATE or PLAC |
535 | 535 | if ($data == 'y') { |
@@ -545,40 +545,40 @@ discard block |
||
545 | 545 | } |
546 | 546 | // Reassemble components back into a single line |
547 | 547 | switch ($tag) { |
548 | - default: |
|
549 | - // Remove tabs and multiple/leading/trailing spaces |
|
550 | - if (strpos($data, "\t") !== false) { |
|
551 | - $data = str_replace("\t", ' ', $data); |
|
552 | - } |
|
553 | - if (substr($data, 0, 1) == ' ' || substr($data, -1, 1) == ' ') { |
|
554 | - $data = trim($data); |
|
555 | - } |
|
556 | - while (strpos($data, ' ')) { |
|
557 | - $data = str_replace(' ', ' ', $data); |
|
558 | - } |
|
559 | - $newrec .= ($newrec ? "\n" : '') . $level . ' ' . ($level == '0' && $xref ? $xref . ' ' : '') . $tag . ($data === '' && $tag != "NOTE" ? '' : ' ' . $data); |
|
560 | - break; |
|
561 | - case 'NOTE': |
|
562 | - case 'TEXT': |
|
563 | - case 'DATA': |
|
564 | - case 'CONT': |
|
565 | - $newrec .= ($newrec ? "\n" : '') . $level . ' ' . ($level == '0' && $xref ? $xref . ' ' : '') . $tag . ($data === '' && $tag != "NOTE" ? '' : ' ' . $data); |
|
566 | - break; |
|
567 | - case 'FILE': |
|
568 | - // Strip off the user-defined path prefix |
|
569 | - $GEDCOM_MEDIA_PATH = $tree->getPreference('GEDCOM_MEDIA_PATH'); |
|
570 | - if ($GEDCOM_MEDIA_PATH && strpos($data, $GEDCOM_MEDIA_PATH) === 0) { |
|
571 | - $data = substr($data, strlen($GEDCOM_MEDIA_PATH)); |
|
572 | - } |
|
573 | - // convert backslashes in filenames to forward slashes |
|
574 | - $data = preg_replace("/\\\/", "/", $data); |
|
548 | + default: |
|
549 | + // Remove tabs and multiple/leading/trailing spaces |
|
550 | + if (strpos($data, "\t") !== false) { |
|
551 | + $data = str_replace("\t", ' ', $data); |
|
552 | + } |
|
553 | + if (substr($data, 0, 1) == ' ' || substr($data, -1, 1) == ' ') { |
|
554 | + $data = trim($data); |
|
555 | + } |
|
556 | + while (strpos($data, ' ')) { |
|
557 | + $data = str_replace(' ', ' ', $data); |
|
558 | + } |
|
559 | + $newrec .= ($newrec ? "\n" : '') . $level . ' ' . ($level == '0' && $xref ? $xref . ' ' : '') . $tag . ($data === '' && $tag != "NOTE" ? '' : ' ' . $data); |
|
560 | + break; |
|
561 | + case 'NOTE': |
|
562 | + case 'TEXT': |
|
563 | + case 'DATA': |
|
564 | + case 'CONT': |
|
565 | + $newrec .= ($newrec ? "\n" : '') . $level . ' ' . ($level == '0' && $xref ? $xref . ' ' : '') . $tag . ($data === '' && $tag != "NOTE" ? '' : ' ' . $data); |
|
566 | + break; |
|
567 | + case 'FILE': |
|
568 | + // Strip off the user-defined path prefix |
|
569 | + $GEDCOM_MEDIA_PATH = $tree->getPreference('GEDCOM_MEDIA_PATH'); |
|
570 | + if ($GEDCOM_MEDIA_PATH && strpos($data, $GEDCOM_MEDIA_PATH) === 0) { |
|
571 | + $data = substr($data, strlen($GEDCOM_MEDIA_PATH)); |
|
572 | + } |
|
573 | + // convert backslashes in filenames to forward slashes |
|
574 | + $data = preg_replace("/\\\/", "/", $data); |
|
575 | 575 | |
576 | - $newrec .= ($newrec ? "\n" : '') . $level . ' ' . ($level == '0' && $xref ? $xref . ' ' : '') . $tag . ($data === '' && $tag != "NOTE" ? '' : ' ' . $data); |
|
577 | - break; |
|
578 | - case 'CONC': |
|
579 | - // Merge CONC lines, to simplify access later on. |
|
580 | - $newrec .= ($tree->getPreference('WORD_WRAPPED_NOTES') ? ' ' : '') . $data; |
|
581 | - break; |
|
576 | + $newrec .= ($newrec ? "\n" : '') . $level . ' ' . ($level == '0' && $xref ? $xref . ' ' : '') . $tag . ($data === '' && $tag != "NOTE" ? '' : ' ' . $data); |
|
577 | + break; |
|
578 | + case 'CONC': |
|
579 | + // Merge CONC lines, to simplify access later on. |
|
580 | + $newrec .= ($tree->getPreference('WORD_WRAPPED_NOTES') ? ' ' : '') . $data; |
|
581 | + break; |
|
582 | 582 | } |
583 | 583 | } |
584 | 584 | |
@@ -635,123 +635,123 @@ discard block |
||
635 | 635 | } |
636 | 636 | |
637 | 637 | switch ($type) { |
638 | - case 'INDI': |
|
639 | - // Convert inline media into media objects |
|
640 | - $gedrec = self::convertInlineMedia($tree, $gedrec); |
|
638 | + case 'INDI': |
|
639 | + // Convert inline media into media objects |
|
640 | + $gedrec = self::convertInlineMedia($tree, $gedrec); |
|
641 | 641 | |
642 | - $record = new Individual($xref, $gedrec, null, $tree); |
|
643 | - if (preg_match('/\n1 RIN (.+)/', $gedrec, $match)) { |
|
644 | - $rin = $match[1]; |
|
645 | - } else { |
|
646 | - $rin = $xref; |
|
647 | - } |
|
648 | - Database::prepare( |
|
649 | - "INSERT INTO `##individuals` (i_id, i_file, i_rin, i_sex, i_gedcom) VALUES (?, ?, ?, ?, ?)" |
|
650 | - )->execute(array( |
|
651 | - $xref, $tree_id, $rin, $record->getSex(), $gedrec, |
|
652 | - )); |
|
653 | - // Update the cross-reference/index tables. |
|
654 | - self::updatePlaces($xref, $tree_id, $gedrec); |
|
655 | - self::updateDates($xref, $tree_id, $gedrec); |
|
656 | - self::updateLinks($xref, $tree_id, $gedrec); |
|
657 | - self::updateNames($xref, $tree_id, $record); |
|
658 | - break; |
|
659 | - case 'FAM': |
|
660 | - // Convert inline media into media objects |
|
661 | - $gedrec = self::convertInlineMedia($tree, $gedrec); |
|
642 | + $record = new Individual($xref, $gedrec, null, $tree); |
|
643 | + if (preg_match('/\n1 RIN (.+)/', $gedrec, $match)) { |
|
644 | + $rin = $match[1]; |
|
645 | + } else { |
|
646 | + $rin = $xref; |
|
647 | + } |
|
648 | + Database::prepare( |
|
649 | + "INSERT INTO `##individuals` (i_id, i_file, i_rin, i_sex, i_gedcom) VALUES (?, ?, ?, ?, ?)" |
|
650 | + )->execute(array( |
|
651 | + $xref, $tree_id, $rin, $record->getSex(), $gedrec, |
|
652 | + )); |
|
653 | + // Update the cross-reference/index tables. |
|
654 | + self::updatePlaces($xref, $tree_id, $gedrec); |
|
655 | + self::updateDates($xref, $tree_id, $gedrec); |
|
656 | + self::updateLinks($xref, $tree_id, $gedrec); |
|
657 | + self::updateNames($xref, $tree_id, $record); |
|
658 | + break; |
|
659 | + case 'FAM': |
|
660 | + // Convert inline media into media objects |
|
661 | + $gedrec = self::convertInlineMedia($tree, $gedrec); |
|
662 | 662 | |
663 | - if (preg_match('/\n1 HUSB @(' . WT_REGEX_XREF . ')@/', $gedrec, $match)) { |
|
664 | - $husb = $match[1]; |
|
665 | - } else { |
|
666 | - $husb = ''; |
|
667 | - } |
|
668 | - if (preg_match('/\n1 WIFE @(' . WT_REGEX_XREF . ')@/', $gedrec, $match)) { |
|
669 | - $wife = $match[1]; |
|
670 | - } else { |
|
671 | - $wife = ''; |
|
672 | - } |
|
673 | - $nchi = preg_match_all('/\n1 CHIL @(' . WT_REGEX_XREF . ')@/', $gedrec, $match); |
|
674 | - if (preg_match('/\n1 NCHI (\d+)/', $gedrec, $match)) { |
|
675 | - $nchi = max($nchi, $match[1]); |
|
676 | - } |
|
677 | - Database::prepare( |
|
678 | - "INSERT INTO `##families` (f_id, f_file, f_husb, f_wife, f_gedcom, f_numchil) VALUES (?, ?, ?, ?, ?, ?)" |
|
679 | - )->execute(array( |
|
680 | - $xref, $tree_id, $husb, $wife, $gedrec, $nchi, |
|
681 | - )); |
|
682 | - // Update the cross-reference/index tables. |
|
683 | - self::updatePlaces($xref, $tree_id, $gedrec); |
|
684 | - self::updateDates($xref, $tree_id, $gedrec); |
|
685 | - self::updateLinks($xref, $tree_id, $gedrec); |
|
686 | - break; |
|
687 | - case 'SOUR': |
|
688 | - // Convert inline media into media objects |
|
689 | - $gedrec = self::convertInlineMedia($tree, $gedrec); |
|
663 | + if (preg_match('/\n1 HUSB @(' . WT_REGEX_XREF . ')@/', $gedrec, $match)) { |
|
664 | + $husb = $match[1]; |
|
665 | + } else { |
|
666 | + $husb = ''; |
|
667 | + } |
|
668 | + if (preg_match('/\n1 WIFE @(' . WT_REGEX_XREF . ')@/', $gedrec, $match)) { |
|
669 | + $wife = $match[1]; |
|
670 | + } else { |
|
671 | + $wife = ''; |
|
672 | + } |
|
673 | + $nchi = preg_match_all('/\n1 CHIL @(' . WT_REGEX_XREF . ')@/', $gedrec, $match); |
|
674 | + if (preg_match('/\n1 NCHI (\d+)/', $gedrec, $match)) { |
|
675 | + $nchi = max($nchi, $match[1]); |
|
676 | + } |
|
677 | + Database::prepare( |
|
678 | + "INSERT INTO `##families` (f_id, f_file, f_husb, f_wife, f_gedcom, f_numchil) VALUES (?, ?, ?, ?, ?, ?)" |
|
679 | + )->execute(array( |
|
680 | + $xref, $tree_id, $husb, $wife, $gedrec, $nchi, |
|
681 | + )); |
|
682 | + // Update the cross-reference/index tables. |
|
683 | + self::updatePlaces($xref, $tree_id, $gedrec); |
|
684 | + self::updateDates($xref, $tree_id, $gedrec); |
|
685 | + self::updateLinks($xref, $tree_id, $gedrec); |
|
686 | + break; |
|
687 | + case 'SOUR': |
|
688 | + // Convert inline media into media objects |
|
689 | + $gedrec = self::convertInlineMedia($tree, $gedrec); |
|
690 | 690 | |
691 | - $record = new Source($xref, $gedrec, null, $tree); |
|
692 | - if (preg_match('/\n1 TITL (.+)/', $gedrec, $match)) { |
|
693 | - $name = $match[1]; |
|
694 | - } elseif (preg_match('/\n1 ABBR (.+)/', $gedrec, $match)) { |
|
695 | - $name = $match[1]; |
|
696 | - } else { |
|
697 | - $name = $xref; |
|
698 | - } |
|
699 | - Database::prepare( |
|
700 | - "INSERT INTO `##sources` (s_id, s_file, s_name, s_gedcom) VALUES (?, ?, LEFT(?, 255), ?)" |
|
701 | - )->execute(array( |
|
702 | - $xref, $tree_id, $name, $gedrec, |
|
703 | - )); |
|
704 | - // Update the cross-reference/index tables. |
|
705 | - self::updateLinks($xref, $tree_id, $gedrec); |
|
706 | - self::updateNames($xref, $tree_id, $record); |
|
707 | - break; |
|
708 | - case 'REPO': |
|
709 | - // Convert inline media into media objects |
|
710 | - $gedrec = self::convertInlineMedia($tree, $gedrec); |
|
691 | + $record = new Source($xref, $gedrec, null, $tree); |
|
692 | + if (preg_match('/\n1 TITL (.+)/', $gedrec, $match)) { |
|
693 | + $name = $match[1]; |
|
694 | + } elseif (preg_match('/\n1 ABBR (.+)/', $gedrec, $match)) { |
|
695 | + $name = $match[1]; |
|
696 | + } else { |
|
697 | + $name = $xref; |
|
698 | + } |
|
699 | + Database::prepare( |
|
700 | + "INSERT INTO `##sources` (s_id, s_file, s_name, s_gedcom) VALUES (?, ?, LEFT(?, 255), ?)" |
|
701 | + )->execute(array( |
|
702 | + $xref, $tree_id, $name, $gedrec, |
|
703 | + )); |
|
704 | + // Update the cross-reference/index tables. |
|
705 | + self::updateLinks($xref, $tree_id, $gedrec); |
|
706 | + self::updateNames($xref, $tree_id, $record); |
|
707 | + break; |
|
708 | + case 'REPO': |
|
709 | + // Convert inline media into media objects |
|
710 | + $gedrec = self::convertInlineMedia($tree, $gedrec); |
|
711 | 711 | |
712 | - $record = new Repository($xref, $gedrec, null, $tree); |
|
713 | - Database::prepare( |
|
714 | - "INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom) VALUES (?, ?, 'REPO', ?)" |
|
715 | - )->execute(array( |
|
716 | - $xref, $tree_id, $gedrec, |
|
717 | - )); |
|
718 | - // Update the cross-reference/index tables. |
|
719 | - self::updateLinks($xref, $tree_id, $gedrec); |
|
720 | - self::updateNames($xref, $tree_id, $record); |
|
721 | - break; |
|
722 | - case 'NOTE': |
|
723 | - $record = new Note($xref, $gedrec, null, $tree); |
|
724 | - Database::prepare( |
|
725 | - "INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom) VALUES (?, ?, 'NOTE', ?)" |
|
726 | - )->execute(array( |
|
727 | - $xref, $tree_id, $gedrec, |
|
728 | - )); |
|
729 | - // Update the cross-reference/index tables. |
|
730 | - self::updateLinks($xref, $tree_id, $gedrec); |
|
731 | - self::updateNames($xref, $tree_id, $record); |
|
732 | - break; |
|
733 | - case 'OBJE': |
|
734 | - $record = new Media($xref, $gedrec, null, $tree); |
|
735 | - Database::prepare( |
|
736 | - "INSERT INTO `##media` (m_id, m_ext, m_type, m_titl, m_filename, m_file, m_gedcom) VALUES (?, LEFT(?, 6), LEFT(?, 60), LEFT(?, 255), left(?, 512), ?, ?)" |
|
737 | - )->execute(array( |
|
738 | - $xref, $record->extension(), $record->getMediaType(), $record->getTitle(), $record->getFilename(), $tree_id, $gedrec, |
|
739 | - )); |
|
740 | - // Update the cross-reference/index tables. |
|
741 | - self::updateLinks($xref, $tree_id, $gedrec); |
|
742 | - self::updateNames($xref, $tree_id, $record); |
|
743 | - break; |
|
744 | - default: // HEAD, TRLR, SUBM, SUBN, and custom record types. |
|
745 | - // Force HEAD records to have a creation date. |
|
746 | - if ($type === 'HEAD' && strpos($gedrec, "\n1 DATE ") === false) { |
|
747 | - $gedrec .= "\n1 DATE " . date('j M Y'); |
|
748 | - } |
|
749 | - Database::prepare( |
|
750 | - "INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom) VALUES (?, ?, LEFT(?, 15), ?)" |
|
751 | - )->execute(array($xref, $tree_id, $type, $gedrec)); |
|
752 | - // Update the cross-reference/index tables. |
|
753 | - self::updateLinks($xref, $tree_id, $gedrec); |
|
754 | - break; |
|
712 | + $record = new Repository($xref, $gedrec, null, $tree); |
|
713 | + Database::prepare( |
|
714 | + "INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom) VALUES (?, ?, 'REPO', ?)" |
|
715 | + )->execute(array( |
|
716 | + $xref, $tree_id, $gedrec, |
|
717 | + )); |
|
718 | + // Update the cross-reference/index tables. |
|
719 | + self::updateLinks($xref, $tree_id, $gedrec); |
|
720 | + self::updateNames($xref, $tree_id, $record); |
|
721 | + break; |
|
722 | + case 'NOTE': |
|
723 | + $record = new Note($xref, $gedrec, null, $tree); |
|
724 | + Database::prepare( |
|
725 | + "INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom) VALUES (?, ?, 'NOTE', ?)" |
|
726 | + )->execute(array( |
|
727 | + $xref, $tree_id, $gedrec, |
|
728 | + )); |
|
729 | + // Update the cross-reference/index tables. |
|
730 | + self::updateLinks($xref, $tree_id, $gedrec); |
|
731 | + self::updateNames($xref, $tree_id, $record); |
|
732 | + break; |
|
733 | + case 'OBJE': |
|
734 | + $record = new Media($xref, $gedrec, null, $tree); |
|
735 | + Database::prepare( |
|
736 | + "INSERT INTO `##media` (m_id, m_ext, m_type, m_titl, m_filename, m_file, m_gedcom) VALUES (?, LEFT(?, 6), LEFT(?, 60), LEFT(?, 255), left(?, 512), ?, ?)" |
|
737 | + )->execute(array( |
|
738 | + $xref, $record->extension(), $record->getMediaType(), $record->getTitle(), $record->getFilename(), $tree_id, $gedrec, |
|
739 | + )); |
|
740 | + // Update the cross-reference/index tables. |
|
741 | + self::updateLinks($xref, $tree_id, $gedrec); |
|
742 | + self::updateNames($xref, $tree_id, $record); |
|
743 | + break; |
|
744 | + default: // HEAD, TRLR, SUBM, SUBN, and custom record types. |
|
745 | + // Force HEAD records to have a creation date. |
|
746 | + if ($type === 'HEAD' && strpos($gedrec, "\n1 DATE ") === false) { |
|
747 | + $gedrec .= "\n1 DATE " . date('j M Y'); |
|
748 | + } |
|
749 | + Database::prepare( |
|
750 | + "INSERT INTO `##other` (o_id, o_file, o_type, o_gedcom) VALUES (?, ?, LEFT(?, 15), ?)" |
|
751 | + )->execute(array($xref, $tree_id, $type, $gedrec)); |
|
752 | + // Update the cross-reference/index tables. |
|
753 | + self::updateLinks($xref, $tree_id, $gedrec); |
|
754 | + break; |
|
755 | 755 | } |
756 | 756 | } |
757 | 757 | |
@@ -1130,21 +1130,21 @@ discard block |
||
1130 | 1130 | Database::prepare("DELETE FROM `##link` WHERE l_from=? AND l_file=?")->execute(array($gid, $ged_id)); |
1131 | 1131 | |
1132 | 1132 | switch ($type) { |
1133 | - case 'INDI': |
|
1134 | - Database::prepare("DELETE FROM `##individuals` WHERE i_id=? AND i_file=?")->execute(array($gid, $ged_id)); |
|
1135 | - break; |
|
1136 | - case 'FAM': |
|
1137 | - Database::prepare("DELETE FROM `##families` WHERE f_id=? AND f_file=?")->execute(array($gid, $ged_id)); |
|
1138 | - break; |
|
1139 | - case 'SOUR': |
|
1140 | - Database::prepare("DELETE FROM `##sources` WHERE s_id=? AND s_file=?")->execute(array($gid, $ged_id)); |
|
1141 | - break; |
|
1142 | - case 'OBJE': |
|
1143 | - Database::prepare("DELETE FROM `##media` WHERE m_id=? AND m_file=?")->execute(array($gid, $ged_id)); |
|
1144 | - break; |
|
1145 | - default: |
|
1146 | - Database::prepare("DELETE FROM `##other` WHERE o_id=? AND o_file=?")->execute(array($gid, $ged_id)); |
|
1147 | - break; |
|
1133 | + case 'INDI': |
|
1134 | + Database::prepare("DELETE FROM `##individuals` WHERE i_id=? AND i_file=?")->execute(array($gid, $ged_id)); |
|
1135 | + break; |
|
1136 | + case 'FAM': |
|
1137 | + Database::prepare("DELETE FROM `##families` WHERE f_id=? AND f_file=?")->execute(array($gid, $ged_id)); |
|
1138 | + break; |
|
1139 | + case 'SOUR': |
|
1140 | + Database::prepare("DELETE FROM `##sources` WHERE s_id=? AND s_file=?")->execute(array($gid, $ged_id)); |
|
1141 | + break; |
|
1142 | + case 'OBJE': |
|
1143 | + Database::prepare("DELETE FROM `##media` WHERE m_id=? AND m_file=?")->execute(array($gid, $ged_id)); |
|
1144 | + break; |
|
1145 | + default: |
|
1146 | + Database::prepare("DELETE FROM `##other` WHERE o_id=? AND o_file=?")->execute(array($gid, $ged_id)); |
|
1147 | + break; |
|
1148 | 1148 | } |
1149 | 1149 | |
1150 | 1150 | if (!$delete) { |
@@ -559,19 +559,19 @@ discard block |
||
559 | 559 | } else { |
560 | 560 | // Not all facts have help text. |
561 | 561 | switch ($fact) { |
562 | - case 'NAME': |
|
563 | - if ($upperlevel !== 'REPO' && $upperlevel !== 'UNKNOWN') { |
|
562 | + case 'NAME': |
|
563 | + if ($upperlevel !== 'REPO' && $upperlevel !== 'UNKNOWN') { |
|
564 | + echo FunctionsPrint::helpLink($fact); |
|
565 | + } |
|
566 | + break; |
|
567 | + case 'DATE': |
|
568 | + case 'PLAC': |
|
569 | + case 'RESN': |
|
570 | + case 'ROMN': |
|
571 | + case 'SURN': |
|
572 | + case '_HEB': |
|
564 | 573 | echo FunctionsPrint::helpLink($fact); |
565 | - } |
|
566 | - break; |
|
567 | - case 'DATE': |
|
568 | - case 'PLAC': |
|
569 | - case 'RESN': |
|
570 | - case 'ROMN': |
|
571 | - case 'SURN': |
|
572 | - case '_HEB': |
|
573 | - echo FunctionsPrint::helpLink($fact); |
|
574 | - break; |
|
574 | + break; |
|
575 | 575 | } |
576 | 576 | } |
577 | 577 | // tag level |
@@ -716,51 +716,51 @@ discard block |
||
716 | 716 | |
717 | 717 | // Extra markup for specific fact types |
718 | 718 | switch ($fact) { |
719 | - case 'ALIA': |
|
720 | - case 'ASSO': |
|
721 | - case '_ASSO': |
|
722 | - echo ' data-autocomplete-type="ASSO" data-autocomplete-extra="input.DATE"'; |
|
723 | - break; |
|
724 | - case 'DATE': |
|
725 | - echo ' onblur="valid_date(this);" onmouseout="valid_date(this);"'; |
|
726 | - break; |
|
727 | - case 'GIVN': |
|
728 | - echo ' autofocus data-autocomplete-type="GIVN"'; |
|
729 | - break; |
|
730 | - case 'LATI': |
|
731 | - echo ' onblur="valid_lati_long(this, \'N\', \'S\');" onmouseout="valid_lati_long(this, \'N\', \'S\');"'; |
|
732 | - break; |
|
733 | - case 'LONG': |
|
734 | - echo ' onblur="valid_lati_long(this, \'E\', \'W\');" onmouseout="valid_lati_long(this, \'E\', \'W\');"'; |
|
735 | - break; |
|
736 | - case 'NOTE': |
|
737 | - // Shared notes. Inline notes are handled elsewhere. |
|
738 | - echo ' data-autocomplete-type="NOTE"'; |
|
739 | - break; |
|
740 | - case 'OBJE': |
|
741 | - echo ' data-autocomplete-type="OBJE"'; |
|
742 | - break; |
|
743 | - case 'PAGE': |
|
744 | - echo ' data-autocomplete-type="PAGE" data-autocomplete-extra="#' . $source_element_id . '"'; |
|
745 | - break; |
|
746 | - case 'PLAC': |
|
747 | - echo ' data-autocomplete-type="PLAC"'; |
|
748 | - break; |
|
749 | - case 'REPO': |
|
750 | - echo ' data-autocomplete-type="REPO"'; |
|
751 | - break; |
|
752 | - case 'SOUR': |
|
753 | - $source_element_id = $element_id; |
|
754 | - echo ' data-autocomplete-type="SOUR"'; |
|
755 | - break; |
|
756 | - case 'SURN': |
|
757 | - case '_MARNM_SURN': |
|
758 | - echo ' data-autocomplete-type="SURN"'; |
|
759 | - break; |
|
760 | - case 'TIME': |
|
761 | - echo ' pattern="([0-1][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?" dir="ltr" placeholder="' . /* I18N: Examples of valid time formats (hours:minutes:seconds) */ |
|
762 | - I18N::translate('hh:mm or hh:mm:ss') . '"'; |
|
763 | - break; |
|
719 | + case 'ALIA': |
|
720 | + case 'ASSO': |
|
721 | + case '_ASSO': |
|
722 | + echo ' data-autocomplete-type="ASSO" data-autocomplete-extra="input.DATE"'; |
|
723 | + break; |
|
724 | + case 'DATE': |
|
725 | + echo ' onblur="valid_date(this);" onmouseout="valid_date(this);"'; |
|
726 | + break; |
|
727 | + case 'GIVN': |
|
728 | + echo ' autofocus data-autocomplete-type="GIVN"'; |
|
729 | + break; |
|
730 | + case 'LATI': |
|
731 | + echo ' onblur="valid_lati_long(this, \'N\', \'S\');" onmouseout="valid_lati_long(this, \'N\', \'S\');"'; |
|
732 | + break; |
|
733 | + case 'LONG': |
|
734 | + echo ' onblur="valid_lati_long(this, \'E\', \'W\');" onmouseout="valid_lati_long(this, \'E\', \'W\');"'; |
|
735 | + break; |
|
736 | + case 'NOTE': |
|
737 | + // Shared notes. Inline notes are handled elsewhere. |
|
738 | + echo ' data-autocomplete-type="NOTE"'; |
|
739 | + break; |
|
740 | + case 'OBJE': |
|
741 | + echo ' data-autocomplete-type="OBJE"'; |
|
742 | + break; |
|
743 | + case 'PAGE': |
|
744 | + echo ' data-autocomplete-type="PAGE" data-autocomplete-extra="#' . $source_element_id . '"'; |
|
745 | + break; |
|
746 | + case 'PLAC': |
|
747 | + echo ' data-autocomplete-type="PLAC"'; |
|
748 | + break; |
|
749 | + case 'REPO': |
|
750 | + echo ' data-autocomplete-type="REPO"'; |
|
751 | + break; |
|
752 | + case 'SOUR': |
|
753 | + $source_element_id = $element_id; |
|
754 | + echo ' data-autocomplete-type="SOUR"'; |
|
755 | + break; |
|
756 | + case 'SURN': |
|
757 | + case '_MARNM_SURN': |
|
758 | + echo ' data-autocomplete-type="SURN"'; |
|
759 | + break; |
|
760 | + case 'TIME': |
|
761 | + echo ' pattern="([0-1][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?" dir="ltr" placeholder="' . /* I18N: Examples of valid time formats (hours:minutes:seconds) */ |
|
762 | + I18N::translate('hh:mm or hh:mm:ss') . '"'; |
|
763 | + break; |
|
764 | 764 | } |
765 | 765 | echo '>'; |
766 | 766 | } |
@@ -810,41 +810,41 @@ discard block |
||
810 | 810 | |
811 | 811 | // popup links |
812 | 812 | switch ($fact) { |
813 | - case 'DATE': |
|
814 | - echo self::printCalendarPopup($element_id); |
|
815 | - break; |
|
816 | - case 'FAMC': |
|
817 | - case 'FAMS': |
|
818 | - echo FunctionsPrint::printFindFamilyLink($element_id); |
|
819 | - break; |
|
820 | - case 'ALIA': |
|
821 | - case 'ASSO': |
|
822 | - case '_ASSO': |
|
823 | - echo FunctionsPrint::printFindIndividualLink($element_id, $element_id . '_description'); |
|
824 | - break; |
|
825 | - case 'FILE': |
|
826 | - FunctionsPrint::printFindMediaLink($element_id, '0file'); |
|
827 | - break; |
|
828 | - case 'SOUR': |
|
829 | - echo FunctionsPrint::printFindSourceLink($element_id, $element_id . '_description'), ' ', self::printAddNewSourceLink($element_id); |
|
830 | - //-- checkboxes to apply '1 SOUR' to BIRT/MARR/DEAT as '2 SOUR' |
|
831 | - if ($level === 1) { |
|
832 | - echo '<br>'; |
|
833 | - switch ($WT_TREE->getPreference('PREFER_LEVEL2_SOURCES')) { |
|
834 | - case '2': // records |
|
835 | - $level1_checked = 'checked'; |
|
836 | - $level2_checked = ''; |
|
813 | + case 'DATE': |
|
814 | + echo self::printCalendarPopup($element_id); |
|
815 | + break; |
|
816 | + case 'FAMC': |
|
817 | + case 'FAMS': |
|
818 | + echo FunctionsPrint::printFindFamilyLink($element_id); |
|
837 | 819 | break; |
838 | - case '1': // facts |
|
839 | - $level1_checked = ''; |
|
840 | - $level2_checked = 'checked'; |
|
820 | + case 'ALIA': |
|
821 | + case 'ASSO': |
|
822 | + case '_ASSO': |
|
823 | + echo FunctionsPrint::printFindIndividualLink($element_id, $element_id . '_description'); |
|
841 | 824 | break; |
842 | - case '0': // none |
|
843 | - default: |
|
844 | - $level1_checked = ''; |
|
845 | - $level2_checked = ''; |
|
825 | + case 'FILE': |
|
826 | + FunctionsPrint::printFindMediaLink($element_id, '0file'); |
|
846 | 827 | break; |
847 | - } |
|
828 | + case 'SOUR': |
|
829 | + echo FunctionsPrint::printFindSourceLink($element_id, $element_id . '_description'), ' ', self::printAddNewSourceLink($element_id); |
|
830 | + //-- checkboxes to apply '1 SOUR' to BIRT/MARR/DEAT as '2 SOUR' |
|
831 | + if ($level === 1) { |
|
832 | + echo '<br>'; |
|
833 | + switch ($WT_TREE->getPreference('PREFER_LEVEL2_SOURCES')) { |
|
834 | + case '2': // records |
|
835 | + $level1_checked = 'checked'; |
|
836 | + $level2_checked = ''; |
|
837 | + break; |
|
838 | + case '1': // facts |
|
839 | + $level1_checked = ''; |
|
840 | + $level2_checked = 'checked'; |
|
841 | + break; |
|
842 | + case '0': // none |
|
843 | + default: |
|
844 | + $level1_checked = ''; |
|
845 | + $level2_checked = ''; |
|
846 | + break; |
|
847 | + } |
|
848 | 848 | if (strpos($bdm, 'B') !== false) { |
849 | 849 | echo ' <label><input type="checkbox" name="SOUR_INDI" ', $level1_checked, ' value="1">', I18N::translate('Individual'), '</label>'; |
850 | 850 | if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('QUICK_REQUIRED_FACTS'), $matches)) { |
@@ -874,26 +874,26 @@ discard block |
||
874 | 874 | } |
875 | 875 | } |
876 | 876 | break; |
877 | - case 'REPO': |
|
878 | - echo FunctionsPrint::printFindRepositoryLink($element_id), ' ', self::printAddNewRepositoryLink($element_id); |
|
879 | - break; |
|
880 | - case 'NOTE': |
|
881 | - // Shared Notes Icons ======================================== |
|
882 | - if ($islink) { |
|
883 | - // Print regular Shared Note icons --------------------------- |
|
884 | - echo ' ', FunctionsPrint::printFindNoteLink($element_id, $element_id . '_description'), ' ', self::printAddNewNoteLink($element_id); |
|
885 | - if ($value) { |
|
886 | - echo ' ', self::printEditNoteLink($value); |
|
877 | + case 'REPO': |
|
878 | + echo FunctionsPrint::printFindRepositoryLink($element_id), ' ', self::printAddNewRepositoryLink($element_id); |
|
879 | + break; |
|
880 | + case 'NOTE': |
|
881 | + // Shared Notes Icons ======================================== |
|
882 | + if ($islink) { |
|
883 | + // Print regular Shared Note icons --------------------------- |
|
884 | + echo ' ', FunctionsPrint::printFindNoteLink($element_id, $element_id . '_description'), ' ', self::printAddNewNoteLink($element_id); |
|
885 | + if ($value) { |
|
886 | + echo ' ', self::printEditNoteLink($value); |
|
887 | + } |
|
887 | 888 | } |
888 | - } |
|
889 | - break; |
|
890 | - case 'OBJE': |
|
891 | - echo FunctionsPrint::printFindMediaLink($element_id, '1media'); |
|
892 | - if (!$value) { |
|
893 | - echo ' ', self::printAddNewMediaLink($element_id); |
|
894 | - $value = 'new'; |
|
895 | - } |
|
896 | - break; |
|
889 | + break; |
|
890 | + case 'OBJE': |
|
891 | + echo FunctionsPrint::printFindMediaLink($element_id, '1media'); |
|
892 | + if (!$value) { |
|
893 | + echo ' ', self::printAddNewMediaLink($element_id); |
|
894 | + $value = 'new'; |
|
895 | + } |
|
896 | + break; |
|
897 | 897 | } |
898 | 898 | |
899 | 899 | echo '<div id="' . $element_id . '_description">'; |
@@ -913,38 +913,38 @@ discard block |
||
913 | 913 | |
914 | 914 | if ($value && $value !== 'new' && $islink) { |
915 | 915 | switch ($fact) { |
916 | - case 'ALIA': |
|
917 | - case 'ASSO': |
|
918 | - case '_ASSO': |
|
919 | - $tmp = Individual::getInstance($value, $WT_TREE); |
|
920 | - if ($tmp) { |
|
921 | - echo ' ', $tmp->getFullName(); |
|
922 | - } |
|
923 | - break; |
|
924 | - case 'SOUR': |
|
925 | - $tmp = Source::getInstance($value, $WT_TREE); |
|
926 | - if ($tmp) { |
|
927 | - echo ' ', $tmp->getFullName(); |
|
928 | - } |
|
929 | - break; |
|
930 | - case 'NOTE': |
|
931 | - $tmp = Note::getInstance($value, $WT_TREE); |
|
932 | - if ($tmp) { |
|
933 | - echo ' ', $tmp->getFullName(); |
|
934 | - } |
|
935 | - break; |
|
936 | - case 'OBJE': |
|
937 | - $tmp = Media::getInstance($value, $WT_TREE); |
|
938 | - if ($tmp) { |
|
939 | - echo ' ', $tmp->getFullName(); |
|
940 | - } |
|
941 | - break; |
|
942 | - case 'REPO': |
|
943 | - $tmp = Repository::getInstance($value, $WT_TREE); |
|
944 | - if ($tmp) { |
|
945 | - echo ' ', $tmp->getFullName(); |
|
946 | - } |
|
947 | - break; |
|
916 | + case 'ALIA': |
|
917 | + case 'ASSO': |
|
918 | + case '_ASSO': |
|
919 | + $tmp = Individual::getInstance($value, $WT_TREE); |
|
920 | + if ($tmp) { |
|
921 | + echo ' ', $tmp->getFullName(); |
|
922 | + } |
|
923 | + break; |
|
924 | + case 'SOUR': |
|
925 | + $tmp = Source::getInstance($value, $WT_TREE); |
|
926 | + if ($tmp) { |
|
927 | + echo ' ', $tmp->getFullName(); |
|
928 | + } |
|
929 | + break; |
|
930 | + case 'NOTE': |
|
931 | + $tmp = Note::getInstance($value, $WT_TREE); |
|
932 | + if ($tmp) { |
|
933 | + echo ' ', $tmp->getFullName(); |
|
934 | + } |
|
935 | + break; |
|
936 | + case 'OBJE': |
|
937 | + $tmp = Media::getInstance($value, $WT_TREE); |
|
938 | + if ($tmp) { |
|
939 | + echo ' ', $tmp->getFullName(); |
|
940 | + } |
|
941 | + break; |
|
942 | + case 'REPO': |
|
943 | + $tmp = Repository::getInstance($value, $WT_TREE); |
|
944 | + if ($tmp) { |
|
945 | + echo ' ', $tmp->getFullName(); |
|
946 | + } |
|
947 | + break; |
|
948 | 948 | } |
949 | 949 | } |
950 | 950 | |
@@ -969,29 +969,29 @@ discard block |
||
969 | 969 | |
970 | 970 | // Show more likely census details at the top of the list. |
971 | 971 | switch (WT_LOCALE) { |
972 | - case 'cs': |
|
973 | - $census_places = array(new CensusOfCzechRepublic); |
|
974 | - break; |
|
975 | - case 'en-AU': |
|
976 | - case 'en-GB': |
|
977 | - $census_places = array(new CensusOfEngland, new CensusOfWales, new CensusOfScotland); |
|
978 | - break; |
|
979 | - case 'en-US': |
|
980 | - $census_places = array(new CensusOfUnitedStates); |
|
981 | - break; |
|
982 | - case 'fr': |
|
983 | - case 'fr-CA': |
|
984 | - $census_places = array(new CensusOfFrance); |
|
985 | - break; |
|
986 | - case 'da': |
|
987 | - $census_places = array(new CensusOfDenmark); |
|
988 | - break; |
|
989 | - case 'de': |
|
990 | - $census_places = array(new CensusOfDeutschland); |
|
991 | - break; |
|
992 | - default: |
|
993 | - $census_places = array(); |
|
994 | - break; |
|
972 | + case 'cs': |
|
973 | + $census_places = array(new CensusOfCzechRepublic); |
|
974 | + break; |
|
975 | + case 'en-AU': |
|
976 | + case 'en-GB': |
|
977 | + $census_places = array(new CensusOfEngland, new CensusOfWales, new CensusOfScotland); |
|
978 | + break; |
|
979 | + case 'en-US': |
|
980 | + $census_places = array(new CensusOfUnitedStates); |
|
981 | + break; |
|
982 | + case 'fr': |
|
983 | + case 'fr-CA': |
|
984 | + $census_places = array(new CensusOfFrance); |
|
985 | + break; |
|
986 | + case 'da': |
|
987 | + $census_places = array(new CensusOfDenmark); |
|
988 | + break; |
|
989 | + case 'de': |
|
990 | + $census_places = array(new CensusOfDeutschland); |
|
991 | + break; |
|
992 | + default: |
|
993 | + $census_places = array(); |
|
994 | + break; |
|
995 | 995 | } |
996 | 996 | foreach (Census::allCensusPlaces() as $census_place) { |
997 | 997 | if (!in_array($census_place, $census_places)) { |
@@ -1053,97 +1053,97 @@ discard block |
||
1053 | 1053 | global $WT_TREE; |
1054 | 1054 | |
1055 | 1055 | switch ($tag) { |
1056 | - case 'SOUR': |
|
1057 | - echo '<a href="#" onclick="return expand_layer(\'newsource\');"><i id="newsource_img" class="icon-plus"></i> ', I18N::translate('Add a source citation'), '</a>'; |
|
1058 | - echo '<br>'; |
|
1059 | - echo '<div id="newsource" style="display: none;">'; |
|
1060 | - echo '<table class="facts_table">'; |
|
1061 | - // 2 SOUR |
|
1062 | - self::addSimpleTag($level . ' SOUR @'); |
|
1063 | - // 3 PAGE |
|
1064 | - self::addSimpleTag(($level + 1) . ' PAGE'); |
|
1065 | - // 3 DATA |
|
1066 | - self::addSimpleTag(($level + 1) . ' DATA'); |
|
1067 | - // 4 TEXT |
|
1068 | - self::addSimpleTag(($level + 2) . ' TEXT'); |
|
1069 | - if ($WT_TREE->getPreference('FULL_SOURCES')) { |
|
1070 | - // 4 DATE |
|
1071 | - self::addSimpleTag(($level + 2) . ' DATE', '', GedcomTag::getLabel('DATA:DATE')); |
|
1072 | - // 3 QUAY |
|
1073 | - self::addSimpleTag(($level + 1) . ' QUAY'); |
|
1074 | - } |
|
1075 | - // 3 OBJE |
|
1076 | - self::addSimpleTag(($level + 1) . ' OBJE'); |
|
1077 | - // 3 SHARED_NOTE |
|
1078 | - self::addSimpleTag(($level + 1) . ' SHARED_NOTE'); |
|
1079 | - echo '</table></div>'; |
|
1080 | - break; |
|
1081 | - |
|
1082 | - case 'ASSO': |
|
1083 | - case 'ASSO2': |
|
1084 | - //-- Add a new ASSOciate |
|
1085 | - if ($tag === 'ASSO') { |
|
1086 | - echo "<a href=\"#\" onclick=\"return expand_layer('newasso');\"><i id=\"newasso_img\" class=\"icon-plus\"></i> ", I18N::translate('Add an associate'), '</a>'; |
|
1056 | + case 'SOUR': |
|
1057 | + echo '<a href="#" onclick="return expand_layer(\'newsource\');"><i id="newsource_img" class="icon-plus"></i> ', I18N::translate('Add a source citation'), '</a>'; |
|
1087 | 1058 | echo '<br>'; |
1088 | - echo '<div id="newasso" style="display: none;">'; |
|
1089 | - } else { |
|
1090 | - echo "<a href=\"#\" onclick=\"return expand_layer('newasso2');\"><i id=\"newasso2_img\" class=\"icon-plus\"></i> ", I18N::translate('Add an associate'), '</a>'; |
|
1059 | + echo '<div id="newsource" style="display: none;">'; |
|
1060 | + echo '<table class="facts_table">'; |
|
1061 | + // 2 SOUR |
|
1062 | + self::addSimpleTag($level . ' SOUR @'); |
|
1063 | + // 3 PAGE |
|
1064 | + self::addSimpleTag(($level + 1) . ' PAGE'); |
|
1065 | + // 3 DATA |
|
1066 | + self::addSimpleTag(($level + 1) . ' DATA'); |
|
1067 | + // 4 TEXT |
|
1068 | + self::addSimpleTag(($level + 2) . ' TEXT'); |
|
1069 | + if ($WT_TREE->getPreference('FULL_SOURCES')) { |
|
1070 | + // 4 DATE |
|
1071 | + self::addSimpleTag(($level + 2) . ' DATE', '', GedcomTag::getLabel('DATA:DATE')); |
|
1072 | + // 3 QUAY |
|
1073 | + self::addSimpleTag(($level + 1) . ' QUAY'); |
|
1074 | + } |
|
1075 | + // 3 OBJE |
|
1076 | + self::addSimpleTag(($level + 1) . ' OBJE'); |
|
1077 | + // 3 SHARED_NOTE |
|
1078 | + self::addSimpleTag(($level + 1) . ' SHARED_NOTE'); |
|
1079 | + echo '</table></div>'; |
|
1080 | + break; |
|
1081 | + |
|
1082 | + case 'ASSO': |
|
1083 | + case 'ASSO2': |
|
1084 | + //-- Add a new ASSOciate |
|
1085 | + if ($tag === 'ASSO') { |
|
1086 | + echo "<a href=\"#\" onclick=\"return expand_layer('newasso');\"><i id=\"newasso_img\" class=\"icon-plus\"></i> ", I18N::translate('Add an associate'), '</a>'; |
|
1087 | + echo '<br>'; |
|
1088 | + echo '<div id="newasso" style="display: none;">'; |
|
1089 | + } else { |
|
1090 | + echo "<a href=\"#\" onclick=\"return expand_layer('newasso2');\"><i id=\"newasso2_img\" class=\"icon-plus\"></i> ", I18N::translate('Add an associate'), '</a>'; |
|
1091 | + echo '<br>'; |
|
1092 | + echo '<div id="newasso2" style="display: none;">'; |
|
1093 | + } |
|
1094 | + echo '<table class="facts_table">'; |
|
1095 | + // 2 ASSO |
|
1096 | + self::addSimpleTag($level . ' _ASSO @'); |
|
1097 | + // 3 RELA |
|
1098 | + self::addSimpleTag(($level + 1) . ' RELA'); |
|
1099 | + // 3 NOTE |
|
1100 | + self::addSimpleTag(($level + 1) . ' NOTE'); |
|
1101 | + // 3 SHARED_NOTE |
|
1102 | + self::addSimpleTag(($level + 1) . ' SHARED_NOTE'); |
|
1103 | + echo '</table></div>'; |
|
1104 | + break; |
|
1105 | + |
|
1106 | + case 'NOTE': |
|
1107 | + //-- Retrieve existing note or add new note to fact |
|
1108 | + echo "<a href=\"#\" onclick=\"return expand_layer('newnote');\"><i id=\"newnote_img\" class=\"icon-plus\"></i> ", I18N::translate('Add a note'), '</a>'; |
|
1091 | 1109 | echo '<br>'; |
1092 | - echo '<div id="newasso2" style="display: none;">'; |
|
1093 | - } |
|
1094 | - echo '<table class="facts_table">'; |
|
1095 | - // 2 ASSO |
|
1096 | - self::addSimpleTag($level . ' _ASSO @'); |
|
1097 | - // 3 RELA |
|
1098 | - self::addSimpleTag(($level + 1) . ' RELA'); |
|
1099 | - // 3 NOTE |
|
1100 | - self::addSimpleTag(($level + 1) . ' NOTE'); |
|
1101 | - // 3 SHARED_NOTE |
|
1102 | - self::addSimpleTag(($level + 1) . ' SHARED_NOTE'); |
|
1103 | - echo '</table></div>'; |
|
1104 | - break; |
|
1105 | - |
|
1106 | - case 'NOTE': |
|
1107 | - //-- Retrieve existing note or add new note to fact |
|
1108 | - echo "<a href=\"#\" onclick=\"return expand_layer('newnote');\"><i id=\"newnote_img\" class=\"icon-plus\"></i> ", I18N::translate('Add a note'), '</a>'; |
|
1109 | - echo '<br>'; |
|
1110 | - echo '<div id="newnote" style="display: none;">'; |
|
1111 | - echo '<table class="facts_table">'; |
|
1112 | - // 2 NOTE |
|
1113 | - self::addSimpleTag($level . ' NOTE'); |
|
1114 | - echo '</table></div>'; |
|
1115 | - break; |
|
1116 | - |
|
1117 | - case 'SHARED_NOTE': |
|
1118 | - echo "<a href=\"#\" onclick=\"return expand_layer('newshared_note');\"><i id=\"newshared_note_img\" class=\"icon-plus\"></i> ", I18N::translate('Add a shared note'), '</a>'; |
|
1119 | - echo '<br>'; |
|
1120 | - echo '<div id="newshared_note" style="display: none;">'; |
|
1121 | - echo '<table class="facts_table">'; |
|
1122 | - // 2 SHARED NOTE |
|
1123 | - self::addSimpleTag($level . ' SHARED_NOTE', $parent_tag); |
|
1124 | - echo '</table></div>'; |
|
1125 | - break; |
|
1126 | - |
|
1127 | - case 'OBJE': |
|
1128 | - if ($WT_TREE->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($WT_TREE)) { |
|
1129 | - echo "<a href=\"#\" onclick=\"return expand_layer('newobje');\"><i id=\"newobje_img\" class=\"icon-plus\"></i> ", I18N::translate('Add a media object'), '</a>'; |
|
1110 | + echo '<div id="newnote" style="display: none;">'; |
|
1111 | + echo '<table class="facts_table">'; |
|
1112 | + // 2 NOTE |
|
1113 | + self::addSimpleTag($level . ' NOTE'); |
|
1114 | + echo '</table></div>'; |
|
1115 | + break; |
|
1116 | + |
|
1117 | + case 'SHARED_NOTE': |
|
1118 | + echo "<a href=\"#\" onclick=\"return expand_layer('newshared_note');\"><i id=\"newshared_note_img\" class=\"icon-plus\"></i> ", I18N::translate('Add a shared note'), '</a>'; |
|
1130 | 1119 | echo '<br>'; |
1131 | - echo '<div id="newobje" style="display: none;">'; |
|
1120 | + echo '<div id="newshared_note" style="display: none;">'; |
|
1132 | 1121 | echo '<table class="facts_table">'; |
1133 | - self::addSimpleTag($level . ' OBJE'); |
|
1122 | + // 2 SHARED NOTE |
|
1123 | + self::addSimpleTag($level . ' SHARED_NOTE', $parent_tag); |
|
1134 | 1124 | echo '</table></div>'; |
1135 | - } |
|
1136 | - break; |
|
1137 | - |
|
1138 | - case 'RESN': |
|
1139 | - echo "<a href=\"#\" onclick=\"return expand_layer('newresn');\"><i id=\"newresn_img\" class=\"icon-plus\"></i> ", I18N::translate('Add a restriction'), '</a>'; |
|
1140 | - echo '<br>'; |
|
1141 | - echo '<div id="newresn" style="display: none;">'; |
|
1142 | - echo '<table class="facts_table">'; |
|
1143 | - // 2 RESN |
|
1144 | - self::addSimpleTag($level . ' RESN'); |
|
1145 | - echo '</table></div>'; |
|
1146 | - break; |
|
1125 | + break; |
|
1126 | + |
|
1127 | + case 'OBJE': |
|
1128 | + if ($WT_TREE->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($WT_TREE)) { |
|
1129 | + echo "<a href=\"#\" onclick=\"return expand_layer('newobje');\"><i id=\"newobje_img\" class=\"icon-plus\"></i> ", I18N::translate('Add a media object'), '</a>'; |
|
1130 | + echo '<br>'; |
|
1131 | + echo '<div id="newobje" style="display: none;">'; |
|
1132 | + echo '<table class="facts_table">'; |
|
1133 | + self::addSimpleTag($level . ' OBJE'); |
|
1134 | + echo '</table></div>'; |
|
1135 | + } |
|
1136 | + break; |
|
1137 | + |
|
1138 | + case 'RESN': |
|
1139 | + echo "<a href=\"#\" onclick=\"return expand_layer('newresn');\"><i id=\"newresn_img\" class=\"icon-plus\"></i> ", I18N::translate('Add a restriction'), '</a>'; |
|
1140 | + echo '<br>'; |
|
1141 | + echo '<div id="newresn" style="display: none;">'; |
|
1142 | + echo '<table class="facts_table">'; |
|
1143 | + // 2 RESN |
|
1144 | + self::addSimpleTag($level . ' RESN'); |
|
1145 | + echo '</table></div>'; |
|
1146 | + break; |
|
1147 | 1147 | } |
1148 | 1148 | } |
1149 | 1149 | |
@@ -1219,12 +1219,12 @@ discard block |
||
1219 | 1219 | */ |
1220 | 1220 | public static function addNewSex() { |
1221 | 1221 | switch (Filter::post('SEX', '[MF]', 'U')) { |
1222 | - case 'M': |
|
1223 | - return "\n1 SEX M"; |
|
1224 | - case 'F': |
|
1225 | - return "\n1 SEX F"; |
|
1226 | - default: |
|
1227 | - return "\n1 SEX U"; |
|
1222 | + case 'M': |
|
1223 | + return "\n1 SEX M"; |
|
1224 | + case 'F': |
|
1225 | + return "\n1 SEX F"; |
|
1226 | + default: |
|
1227 | + return "\n1 SEX U"; |
|
1228 | 1228 | } |
1229 | 1229 | } |
1230 | 1230 | |
@@ -1750,43 +1750,43 @@ discard block |
||
1750 | 1750 | } |
1751 | 1751 | // Add level 3/4 tags as appropriate |
1752 | 1752 | switch ($key) { |
1753 | - case 'PLAC': |
|
1754 | - if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('ADVANCED_PLAC_FACTS'), $match)) { |
|
1755 | - foreach ($match[1] as $tag) { |
|
1756 | - self::addSimpleTag('3 ' . $tag, '', GedcomTag::getLabel($level1tag . ':PLAC:' . $tag)); |
|
1753 | + case 'PLAC': |
|
1754 | + if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('ADVANCED_PLAC_FACTS'), $match)) { |
|
1755 | + foreach ($match[1] as $tag) { |
|
1756 | + self::addSimpleTag('3 ' . $tag, '', GedcomTag::getLabel($level1tag . ':PLAC:' . $tag)); |
|
1757 | + } |
|
1757 | 1758 | } |
1758 | - } |
|
1759 | - self::addSimpleTag('3 MAP'); |
|
1760 | - self::addSimpleTag('4 LATI'); |
|
1761 | - self::addSimpleTag('4 LONG'); |
|
1762 | - break; |
|
1763 | - case 'FILE': |
|
1764 | - self::addSimpleTag('3 FORM'); |
|
1765 | - break; |
|
1766 | - case 'EVEN': |
|
1767 | - self::addSimpleTag('3 DATE'); |
|
1768 | - self::addSimpleTag('3 PLAC'); |
|
1769 | - break; |
|
1770 | - case 'STAT': |
|
1771 | - if (GedcomCodeTemp::isTagLDS($level1tag)) { |
|
1772 | - self::addSimpleTag('3 DATE', '', GedcomTag::getLabel('STAT:DATE')); |
|
1773 | - } |
|
1774 | - break; |
|
1775 | - case 'DATE': |
|
1776 | - // TIME is NOT a valid 5.5.1 tag |
|
1777 | - if (in_array($level1tag, Config::dateAndTime())) { |
|
1778 | - self::addSimpleTag('3 TIME'); |
|
1779 | - } |
|
1780 | - break; |
|
1781 | - case 'HUSB': |
|
1782 | - case 'WIFE': |
|
1783 | - self::addSimpleTag('3 AGE'); |
|
1784 | - break; |
|
1785 | - case 'FAMC': |
|
1786 | - if ($level1tag === 'ADOP') { |
|
1787 | - self::addSimpleTag('3 ADOP BOTH'); |
|
1788 | - } |
|
1789 | - break; |
|
1759 | + self::addSimpleTag('3 MAP'); |
|
1760 | + self::addSimpleTag('4 LATI'); |
|
1761 | + self::addSimpleTag('4 LONG'); |
|
1762 | + break; |
|
1763 | + case 'FILE': |
|
1764 | + self::addSimpleTag('3 FORM'); |
|
1765 | + break; |
|
1766 | + case 'EVEN': |
|
1767 | + self::addSimpleTag('3 DATE'); |
|
1768 | + self::addSimpleTag('3 PLAC'); |
|
1769 | + break; |
|
1770 | + case 'STAT': |
|
1771 | + if (GedcomCodeTemp::isTagLDS($level1tag)) { |
|
1772 | + self::addSimpleTag('3 DATE', '', GedcomTag::getLabel('STAT:DATE')); |
|
1773 | + } |
|
1774 | + break; |
|
1775 | + case 'DATE': |
|
1776 | + // TIME is NOT a valid 5.5.1 tag |
|
1777 | + if (in_array($level1tag, Config::dateAndTime())) { |
|
1778 | + self::addSimpleTag('3 TIME'); |
|
1779 | + } |
|
1780 | + break; |
|
1781 | + case 'HUSB': |
|
1782 | + case 'WIFE': |
|
1783 | + self::addSimpleTag('3 AGE'); |
|
1784 | + break; |
|
1785 | + case 'FAMC': |
|
1786 | + if ($level1tag === 'ADOP') { |
|
1787 | + self::addSimpleTag('3 ADOP BOTH'); |
|
1788 | + } |
|
1789 | + break; |
|
1790 | 1790 | } |
1791 | 1791 | } elseif ($key === 'DATE' && $add_date) { |
1792 | 1792 | self::addSimpleTag('2 DATE', $level1tag, GedcomTag::getLabel($level1tag . ':DATE')); |
@@ -51,20 +51,20 @@ discard block |
||
51 | 51 | public static function printPedigreePerson(Individual $person = null, $show_full = 1) { |
52 | 52 | |
53 | 53 | switch ($show_full) { |
54 | - case 0: |
|
55 | - if ($person) { |
|
56 | - echo Theme::theme()->individualBoxSmall($person); |
|
57 | - } else { |
|
58 | - echo Theme::theme()->individualBoxSmallEmpty(); |
|
59 | - } |
|
60 | - break; |
|
61 | - case 1: |
|
62 | - if ($person) { |
|
63 | - echo Theme::theme()->individualBox($person); |
|
64 | - } else { |
|
65 | - echo Theme::theme()->individualBoxEmpty(); |
|
66 | - } |
|
67 | - break; |
|
54 | + case 0: |
|
55 | + if ($person) { |
|
56 | + echo Theme::theme()->individualBoxSmall($person); |
|
57 | + } else { |
|
58 | + echo Theme::theme()->individualBoxSmallEmpty(); |
|
59 | + } |
|
60 | + break; |
|
61 | + case 1: |
|
62 | + if ($person) { |
|
63 | + echo Theme::theme()->individualBox($person); |
|
64 | + } else { |
|
65 | + echo Theme::theme()->individualBoxEmpty(); |
|
66 | + } |
|
67 | + break; |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
@@ -260,25 +260,25 @@ discard block |
||
260 | 260 | $age = Date::getAge($parent->getBirthDate(), $birth_date, 2); |
261 | 261 | $deatdate = $parent->getDeathDate(); |
262 | 262 | switch ($parent->getSex()) { |
263 | - case 'F': |
|
264 | - // Highlight mothers who die in childbirth or shortly afterwards |
|
265 | - if ($deatdate->isOK() && $deatdate->maximumJulianDay() < $birth_date->minimumJulianDay() + 90) { |
|
266 | - $html .= ' <span title="' . GedcomTag::getLabel('_DEAT_PARE', $parent) . '" class="parentdeath">' . $sex . $age . '</span>'; |
|
267 | - } else { |
|
268 | - $html .= ' <span title="' . I18N::translate('Mother’s age') . '">' . $sex . $age . '</span>'; |
|
269 | - } |
|
270 | - break; |
|
271 | - case 'M': |
|
272 | - // Highlight fathers who die before the birth |
|
273 | - if ($deatdate->isOK() && $deatdate->maximumJulianDay() < $birth_date->minimumJulianDay()) { |
|
274 | - $html .= ' <span title="' . GedcomTag::getLabel('_DEAT_PARE', $parent) . '" class="parentdeath">' . $sex . $age . '</span>'; |
|
275 | - } else { |
|
276 | - $html .= ' <span title="' . I18N::translate('Father’s age') . '">' . $sex . $age . '</span>'; |
|
277 | - } |
|
278 | - break; |
|
279 | - default: |
|
280 | - $html .= ' <span title="' . I18N::translate('Parent’s age') . '">' . $sex . $age . '</span>'; |
|
281 | - break; |
|
263 | + case 'F': |
|
264 | + // Highlight mothers who die in childbirth or shortly afterwards |
|
265 | + if ($deatdate->isOK() && $deatdate->maximumJulianDay() < $birth_date->minimumJulianDay() + 90) { |
|
266 | + $html .= ' <span title="' . GedcomTag::getLabel('_DEAT_PARE', $parent) . '" class="parentdeath">' . $sex . $age . '</span>'; |
|
267 | + } else { |
|
268 | + $html .= ' <span title="' . I18N::translate('Mother’s age') . '">' . $sex . $age . '</span>'; |
|
269 | + } |
|
270 | + break; |
|
271 | + case 'M': |
|
272 | + // Highlight fathers who die before the birth |
|
273 | + if ($deatdate->isOK() && $deatdate->maximumJulianDay() < $birth_date->minimumJulianDay()) { |
|
274 | + $html .= ' <span title="' . GedcomTag::getLabel('_DEAT_PARE', $parent) . '" class="parentdeath">' . $sex . $age . '</span>'; |
|
275 | + } else { |
|
276 | + $html .= ' <span title="' . I18N::translate('Father’s age') . '">' . $sex . $age . '</span>'; |
|
277 | + } |
|
278 | + break; |
|
279 | + default: |
|
280 | + $html .= ' <span title="' . I18N::translate('Parent’s age') . '">' . $sex . $age . '</span>'; |
|
281 | + break; |
|
282 | 282 | } |
283 | 283 | } |
284 | 284 | } |
@@ -573,33 +573,33 @@ discard block |
||
573 | 573 | |
574 | 574 | // -- Add from pick list |
575 | 575 | switch ($type) { |
576 | - case "INDI": |
|
577 | - $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY); |
|
578 | - $uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY); |
|
579 | - $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); |
|
580 | - break; |
|
581 | - case "FAM": |
|
582 | - $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY); |
|
583 | - $uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY); |
|
584 | - $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); |
|
585 | - break; |
|
586 | - case "SOUR": |
|
587 | - $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY); |
|
588 | - $uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY); |
|
589 | - $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); |
|
590 | - break; |
|
591 | - case "NOTE": |
|
592 | - $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY); |
|
593 | - $uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY); |
|
594 | - $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); |
|
595 | - break; |
|
596 | - case "REPO": |
|
597 | - $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY); |
|
598 | - $uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY); |
|
599 | - $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); |
|
600 | - break; |
|
601 | - default: |
|
602 | - return; |
|
576 | + case "INDI": |
|
577 | + $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY); |
|
578 | + $uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY); |
|
579 | + $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('INDI_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); |
|
580 | + break; |
|
581 | + case "FAM": |
|
582 | + $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY); |
|
583 | + $uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY); |
|
584 | + $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('FAM_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); |
|
585 | + break; |
|
586 | + case "SOUR": |
|
587 | + $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY); |
|
588 | + $uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY); |
|
589 | + $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('SOUR_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); |
|
590 | + break; |
|
591 | + case "NOTE": |
|
592 | + $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY); |
|
593 | + $uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY); |
|
594 | + $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('NOTE_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); |
|
595 | + break; |
|
596 | + case "REPO": |
|
597 | + $addfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY); |
|
598 | + $uniquefacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY); |
|
599 | + $quickfacts = preg_split("/[, ;:]+/", $WT_TREE->getPreference('REPO_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); |
|
600 | + break; |
|
601 | + default: |
|
602 | + return; |
|
603 | 603 | } |
604 | 604 | $addfacts = array_merge(self::checkFactUnique($uniquefacts, $usedfacts, $type), $addfacts); |
605 | 605 | $quickfacts = array_intersect($quickfacts, $addfacts); |
@@ -249,18 +249,18 @@ discard block |
||
249 | 249 | */ |
250 | 250 | public static function searchIndividualsPhonetic($soundex, $lastname, $firstname, $place, array $trees) { |
251 | 251 | switch ($soundex) { |
252 | - case 'Russell': |
|
253 | - $givn_sdx = Soundex::russell($firstname); |
|
254 | - $surn_sdx = Soundex::russell($lastname); |
|
255 | - $plac_sdx = Soundex::russell($place); |
|
256 | - break; |
|
257 | - case 'DaitchM': |
|
258 | - $givn_sdx = Soundex::daitchMokotoff($firstname); |
|
259 | - $surn_sdx = Soundex::daitchMokotoff($lastname); |
|
260 | - $plac_sdx = Soundex::daitchMokotoff($place); |
|
261 | - break; |
|
262 | - default: |
|
263 | - throw new \DomainException('soundex: ' . $soundex); |
|
252 | + case 'Russell': |
|
253 | + $givn_sdx = Soundex::russell($firstname); |
|
254 | + $surn_sdx = Soundex::russell($lastname); |
|
255 | + $plac_sdx = Soundex::russell($place); |
|
256 | + break; |
|
257 | + case 'DaitchM': |
|
258 | + $givn_sdx = Soundex::daitchMokotoff($firstname); |
|
259 | + $surn_sdx = Soundex::daitchMokotoff($lastname); |
|
260 | + $plac_sdx = Soundex::daitchMokotoff($place); |
|
261 | + break; |
|
262 | + default: |
|
263 | + throw new \DomainException('soundex: ' . $soundex); |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | // Nothing to search for? Return nothing. |
@@ -292,12 +292,12 @@ discard block |
||
292 | 292 | foreach ($givn_sdx as $n => $sdx) { |
293 | 293 | $sql .= $n ? " OR " : ""; |
294 | 294 | switch ($soundex) { |
295 | - case 'Russell': |
|
296 | - $sql .= "n_soundex_givn_std LIKE CONCAT('%', :given_name_" . $n . ", '%')"; |
|
297 | - break; |
|
298 | - case 'DaitchM': |
|
299 | - $sql .= "n_soundex_givn_dm LIKE CONCAT('%', :given_name_" . $n . ", '%')"; |
|
300 | - break; |
|
295 | + case 'Russell': |
|
296 | + $sql .= "n_soundex_givn_std LIKE CONCAT('%', :given_name_" . $n . ", '%')"; |
|
297 | + break; |
|
298 | + case 'DaitchM': |
|
299 | + $sql .= "n_soundex_givn_dm LIKE CONCAT('%', :given_name_" . $n . ", '%')"; |
|
300 | + break; |
|
301 | 301 | } |
302 | 302 | $args['given_name_' . $n] = $sdx; |
303 | 303 | } |
@@ -310,12 +310,12 @@ discard block |
||
310 | 310 | foreach ($surn_sdx as $n => $sdx) { |
311 | 311 | $sql .= $n ? " OR " : ""; |
312 | 312 | switch ($soundex) { |
313 | - case 'Russell': |
|
314 | - $sql .= "n_soundex_surn_std LIKE CONCAT('%', :surname_" . $n . ", '%')"; |
|
315 | - break; |
|
316 | - case 'DaitchM': |
|
317 | - $sql .= "n_soundex_surn_dm LIKE CONCAT('%', :surname_" . $n . ", '%')"; |
|
318 | - break; |
|
313 | + case 'Russell': |
|
314 | + $sql .= "n_soundex_surn_std LIKE CONCAT('%', :surname_" . $n . ", '%')"; |
|
315 | + break; |
|
316 | + case 'DaitchM': |
|
317 | + $sql .= "n_soundex_surn_dm LIKE CONCAT('%', :surname_" . $n . ", '%')"; |
|
318 | + break; |
|
319 | 319 | } |
320 | 320 | $args['surname_' . $n] = $sdx; |
321 | 321 | } |
@@ -328,12 +328,12 @@ discard block |
||
328 | 328 | foreach ($plac_sdx as $n => $sdx) { |
329 | 329 | $sql .= $n ? " OR " : ""; |
330 | 330 | switch ($soundex) { |
331 | - case 'Russell': |
|
332 | - $sql .= "p_std_soundex LIKE CONCAT('%', :place_" . $n . ", '%')"; |
|
333 | - break; |
|
334 | - case 'DaitchM': |
|
335 | - $sql .= "p_dm_soundex LIKE CONCAT('%', :place_" . $n . ", '%')"; |
|
336 | - break; |
|
331 | + case 'Russell': |
|
332 | + $sql .= "p_std_soundex LIKE CONCAT('%', :place_" . $n . ", '%')"; |
|
333 | + break; |
|
334 | + case 'DaitchM': |
|
335 | + $sql .= "p_dm_soundex LIKE CONCAT('%', :place_" . $n . ", '%')"; |
|
336 | + break; |
|
337 | 337 | } |
338 | 338 | $args['place_' . $n] = $sdx; |
339 | 339 | } |
@@ -758,82 +758,82 @@ discard block |
||
758 | 758 | } else { |
759 | 759 | // SPECIAL CASES: |
760 | 760 | switch ($anniv->m) { |
761 | - case 2: |
|
762 | - // 29 CSH does not include 30 CSH (but would include an invalid 31 CSH if there were no 30 CSH) |
|
763 | - if ($anniv->d === 1) { |
|
764 | - $where .= " AND d_day <= 1 AND d_mon = 2"; |
|
765 | - } elseif ($anniv->d === 30) { |
|
766 | - $where .= " AND d_day >= 30 AND d_mon = 2"; |
|
767 | - } elseif ($anniv->d === 29 && $anniv->daysInMonth() === 29) { |
|
768 | - $where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 2"; |
|
769 | - } else { |
|
770 | - $where .= " AND d_day = :day AND d_mon = 2"; |
|
771 | - $args['day'] = $anniv->d; |
|
772 | - } |
|
773 | - break; |
|
774 | - case 3: |
|
775 | - // 1 KSL includes 30 CSH (if this year didn’t have 30 CSH) |
|
776 | - // 29 KSL does not include 30 KSL (but would include an invalid 31 KSL if there were no 30 KSL) |
|
777 | - if ($anniv->d === 1) { |
|
778 | - $tmp = new JewishDate(array($anniv->y, 'CSH', 1)); |
|
779 | - if ($tmp->daysInMonth() === 29) { |
|
780 | - $where .= " AND (d_day <= 1 AND d_mon = 3 OR d_day = 30 AND d_mon = 2)"; |
|
761 | + case 2: |
|
762 | + // 29 CSH does not include 30 CSH (but would include an invalid 31 CSH if there were no 30 CSH) |
|
763 | + if ($anniv->d === 1) { |
|
764 | + $where .= " AND d_day <= 1 AND d_mon = 2"; |
|
765 | + } elseif ($anniv->d === 30) { |
|
766 | + $where .= " AND d_day >= 30 AND d_mon = 2"; |
|
767 | + } elseif ($anniv->d === 29 && $anniv->daysInMonth() === 29) { |
|
768 | + $where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 2"; |
|
781 | 769 | } else { |
782 | - $where .= " AND d_day <= 1 AND d_mon = 3"; |
|
770 | + $where .= " AND d_day = :day AND d_mon = 2"; |
|
771 | + $args['day'] = $anniv->d; |
|
783 | 772 | } |
784 | - } elseif ($anniv->d === 30) { |
|
785 | - $where .= " AND d_day >= 30 AND d_mon = 3"; |
|
786 | - } elseif ($anniv->d == 29 && $anniv->daysInMonth() === 29) { |
|
787 | - $where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 3"; |
|
788 | - } else { |
|
789 | - $where .= " AND d_day = :day AND d_mon = 3"; |
|
790 | - $args['day'] = $anniv->d; |
|
791 | - } |
|
792 | - break; |
|
793 | - case 4: |
|
794 | - // 1 TVT includes 30 KSL (if this year didn’t have 30 KSL) |
|
795 | - if ($anniv->d === 1) { |
|
796 | - $tmp = new JewishDate(array($anniv->y, 'KSL', 1)); |
|
797 | - if ($tmp->daysInMonth() === 29) { |
|
798 | - $where .= " AND (d_day <=1 AND d_mon = 4 OR d_day = 30 AND d_mon = 3)"; |
|
773 | + break; |
|
774 | + case 3: |
|
775 | + // 1 KSL includes 30 CSH (if this year didn’t have 30 CSH) |
|
776 | + // 29 KSL does not include 30 KSL (but would include an invalid 31 KSL if there were no 30 KSL) |
|
777 | + if ($anniv->d === 1) { |
|
778 | + $tmp = new JewishDate(array($anniv->y, 'CSH', 1)); |
|
779 | + if ($tmp->daysInMonth() === 29) { |
|
780 | + $where .= " AND (d_day <= 1 AND d_mon = 3 OR d_day = 30 AND d_mon = 2)"; |
|
781 | + } else { |
|
782 | + $where .= " AND d_day <= 1 AND d_mon = 3"; |
|
783 | + } |
|
784 | + } elseif ($anniv->d === 30) { |
|
785 | + $where .= " AND d_day >= 30 AND d_mon = 3"; |
|
786 | + } elseif ($anniv->d == 29 && $anniv->daysInMonth() === 29) { |
|
787 | + $where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 3"; |
|
799 | 788 | } else { |
800 | - $where .= " AND d_day <= 1 AND d_mon = 4"; |
|
789 | + $where .= " AND d_day = :day AND d_mon = 3"; |
|
790 | + $args['day'] = $anniv->d; |
|
801 | 791 | } |
802 | - } elseif ($anniv->d === $anniv->daysInMonth()) { |
|
803 | - $where .= " AND d_day >= :day AND d_mon=4"; |
|
804 | - $args['day'] = $anniv->d; |
|
805 | - } else { |
|
806 | - $where .= " AND d_day = :day AND d_mon=4"; |
|
807 | - $args['day'] = $anniv->d; |
|
808 | - } |
|
809 | - break; |
|
810 | - case 7: // ADS includes ADR (non-leap) |
|
811 | - if ($anniv->d === 1) { |
|
812 | - $where .= " AND d_day <= 1"; |
|
813 | - } elseif ($anniv->d === $anniv->daysInMonth()) { |
|
814 | - $where .= " AND d_day >= :day"; |
|
815 | - $args['day'] = $anniv->d; |
|
816 | - } else { |
|
817 | - $where .= " AND d_day = :day"; |
|
818 | - $args['day'] = $anniv->d; |
|
819 | - } |
|
820 | - $where .= " AND (d_mon = 6 AND MOD(7 * d_year + 1, 19) >= 7 OR d_mon = 7)"; |
|
821 | - break; |
|
822 | - case 8: // 1 NSN includes 30 ADR, if this year is non-leap |
|
823 | - if ($anniv->d === 1) { |
|
824 | - if ($anniv->isLeapYear()) { |
|
825 | - $where .= " AND d_day <= 1 AND d_mon = 8"; |
|
792 | + break; |
|
793 | + case 4: |
|
794 | + // 1 TVT includes 30 KSL (if this year didn’t have 30 KSL) |
|
795 | + if ($anniv->d === 1) { |
|
796 | + $tmp = new JewishDate(array($anniv->y, 'KSL', 1)); |
|
797 | + if ($tmp->daysInMonth() === 29) { |
|
798 | + $where .= " AND (d_day <=1 AND d_mon = 4 OR d_day = 30 AND d_mon = 3)"; |
|
799 | + } else { |
|
800 | + $where .= " AND d_day <= 1 AND d_mon = 4"; |
|
801 | + } |
|
802 | + } elseif ($anniv->d === $anniv->daysInMonth()) { |
|
803 | + $where .= " AND d_day >= :day AND d_mon=4"; |
|
804 | + $args['day'] = $anniv->d; |
|
826 | 805 | } else { |
827 | - $where .= " AND (d_day <= 1 AND d_mon = 8 OR d_day = 30 AND d_mon = 6)"; |
|
806 | + $where .= " AND d_day = :day AND d_mon=4"; |
|
807 | + $args['day'] = $anniv->d; |
|
828 | 808 | } |
829 | - } elseif ($anniv->d === $anniv->daysInMonth()) { |
|
830 | - $where .= " AND d_day >= :day AND d_mon = 8"; |
|
831 | - $args['day'] = $anniv->d; |
|
832 | - } else { |
|
833 | - $where .= " AND d_day = :day AND d_mon = 8"; |
|
834 | - $args['day'] = $anniv->d; |
|
835 | - } |
|
836 | - break; |
|
809 | + break; |
|
810 | + case 7: // ADS includes ADR (non-leap) |
|
811 | + if ($anniv->d === 1) { |
|
812 | + $where .= " AND d_day <= 1"; |
|
813 | + } elseif ($anniv->d === $anniv->daysInMonth()) { |
|
814 | + $where .= " AND d_day >= :day"; |
|
815 | + $args['day'] = $anniv->d; |
|
816 | + } else { |
|
817 | + $where .= " AND d_day = :day"; |
|
818 | + $args['day'] = $anniv->d; |
|
819 | + } |
|
820 | + $where .= " AND (d_mon = 6 AND MOD(7 * d_year + 1, 19) >= 7 OR d_mon = 7)"; |
|
821 | + break; |
|
822 | + case 8: // 1 NSN includes 30 ADR, if this year is non-leap |
|
823 | + if ($anniv->d === 1) { |
|
824 | + if ($anniv->isLeapYear()) { |
|
825 | + $where .= " AND d_day <= 1 AND d_mon = 8"; |
|
826 | + } else { |
|
827 | + $where .= " AND (d_day <= 1 AND d_mon = 8 OR d_day = 30 AND d_mon = 6)"; |
|
828 | + } |
|
829 | + } elseif ($anniv->d === $anniv->daysInMonth()) { |
|
830 | + $where .= " AND d_day >= :day AND d_mon = 8"; |
|
831 | + $args['day'] = $anniv->d; |
|
832 | + } else { |
|
833 | + $where .= " AND d_day = :day AND d_mon = 8"; |
|
834 | + $args['day'] = $anniv->d; |
|
835 | + } |
|
836 | + break; |
|
837 | 837 | } |
838 | 838 | } |
839 | 839 | // Only events in the past (includes dates without a year) |