Skip to content

Commit

Permalink
v2.5.1; better translations; better demo
Browse files Browse the repository at this point in the history
  • Loading branch information
justincy committed Jul 25, 2015
1 parent 620e0c0 commit 1a817c3
Show file tree
Hide file tree
Showing 20 changed files with 64 additions and 63 deletions.
38 changes: 29 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="fs-check.min.js"></script>
<script src="lang/en/fs-check-en.js"></script>
<script src="lang/es/fs-check-es.js"></script>
<script>
var opportunities = {};

$(document).ready(function(){
$.getJSON('docs/opportunities.json').done(function(opportunities){
$.getJSON('docs/opportunities.json').done(function(oppsResponse){
opportunities = oppsResponse;
$.each(opportunities, function(key, opportunity){
$('#' + opportunity.type + '-list').append(
$('<a id="opp-' + key + '" href="#' + key + '" class="list-group-item">' + key + '</a>').click(function(){
Expand All @@ -34,27 +38,36 @@
$('#left a.list-group-item:first').click();
}
});

$('#language').change(updateOppDisplay);
});

function displayOpportunity(opportunity){
var oppDOM = $('#opportunity');
FSCheck.translate(opportunity, 'en');
var oppDOM = $('#opportunity'),
lang = $('#language').val();
FSCheck.translate(opportunity, lang);
$('.opp-title', oppDOM).html(opportunity.title);
$('.opp-type', oppDOM).html(opportunity.type);
$('.opp-description', oppDOM).html(opportunity.description);
$('.opp-help', oppDOM).html(displayHelpLinks(FSCheck.id(opportunity.checkId).help));
$('.opp-help', oppDOM).html(displayHelpLinks(FSCheck.id(opportunity.checkId).help, lang));
$('.opp-gensearch', oppDOM).text(JSON.stringify(opportunity.gensearch, null, 2) || 'A gensearch object was not generated for this opportunity.');
};
}

function displayHelpLinks(links){
function displayHelpLinks(links, lang){
var $list = $('<ul>');
$.each(links, function(i, url){
$.each(links, function(i, helpId){
var help = FSCheck.help(helpId, lang);
$('<li>')
.append($('<a>').attr('href', url).attr('target', '_blank').text(url))
.append($('<a>').attr('href', help.url).attr('target', '_blank').text(help.title))
.appendTo($list);
})
});
return $list;
}

function updateOppDisplay(){
var oppId = $('#left .list-group-item.active').text();
displayOpportunity(opportunities[oppId]);
}
</script>
</head>
<body>
Expand All @@ -65,6 +78,13 @@ <h1>FS Check</h1>
</div>
<div class="row">
<div id="left" class="col-sm-3">
<div>
<select id="language" class="form-control">
<option value="en">English</option>
<option value="es">Español</option>
</select>
<br>
</div>
<div id="person-list" class="list-group">
<div class="list-group-item"><h4>Person</h4></div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var FSCheck = module.exports = require('./lib');
var FSCheck = module.exports = require('./lib'),
loadLang = require('./lang/load-language');

FSCheck.language(require('./lang/en'));
FSCheck.language(loadLang('en'));
FSCheck.language(loadLang('es'));
2 changes: 1 addition & 1 deletion lang/en/fs-check-en.js

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions lang/en/lib/checks/missingMarriageDate.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ The [marriage](https://familysearch.org/tree/#view=coupleRelationship&relationsh
between [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) and [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}) has no marriage date.
Try these steps to find the marriage date:

1. Review the record hints in FamilySearch for both [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) and [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}).
1. Do broad searches on popular genealogy websites using the links below or using the [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en) Chrome Extension.
1. Ask for help at the [Genealogy and Family History](http://genealogy.stackexchange.com/) Stack Exchange website.
1. Visit a local [Family History Center](https://familysearch.org/ask/help#localResource).
1. Hire a researcher from the [Genlighten](http://www.genlighten.com/) community.
{{> researchHelpMarriage}}
6 changes: 1 addition & 5 deletions lang/en/lib/checks/missingMarriageFact.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ The [marriage](https://familysearch.org/tree/#view=coupleRelationship&relationsh
between [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) and [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}) has no marriage date or place.
Try these steps to find their marriage information:

1. Review the record hints in FamilySearch for both [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) and [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}).
1. Do broad searches on popular genealogy websites using the links below or using the [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en) Chrome Extension.
1. Ask for help at the [Genealogy and Family History](http://genealogy.stackexchange.com/) Stack Exchange website.
1. Visit a local [Family History Center](https://familysearch.org/ask/help#localResource).
1. Hire a researcher from the [Genlighten](http://www.genlighten.com/) community.
{{> researchHelpMarriage}}
6 changes: 1 addition & 5 deletions lang/en/lib/checks/missingMarriagePlace.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ The [marriage](https://familysearch.org/tree/#view=coupleRelationship&relationsh
between [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) and [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}) has no marriage place.
Try these steps to find the marriage place:

1. Review the record hints in FamilySearch for both [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) and [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}).
1. Do broad searches on popular genealogy websites using the links below or using the [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en) Chrome Extension.
1. Ask for help at the [Genealogy and Family History](http://genealogy.stackexchange.com/) Stack Exchange website.
1. Visit a local [Family History Center](https://familysearch.org/ask/help#localResource).
1. Hire a researcher from the [Genlighten](http://www.genlighten.com/) community.
{{> researchHelpMarriage}}
6 changes: 1 addition & 5 deletions lang/en/lib/checks/missingMarriageSource.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Try these steps to find a marriage record for [{{couple}}](https://familysearch.org/tree/#view=coupleRelationship&relationshipId={{cid}}):

1. Review the record hints for [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) and [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}) in FamilySearch.
1. Do broad searches on popular genealogy websites using the links below or using the [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en) Chrome Extension.
1. Ask for help at the [Genealogy and Family History](http://genealogy.stackexchange.com/) Stack Exchange website.
1. Visit a local [Family History Center](https://familysearch.org/ask/help#localResource).
1. Hire a researcher from the [Genlighten](http://www.genlighten.com/) community.
{{> researchHelpMarriage}}
5 changes: 5 additions & 0 deletions lang/en/lib/partials/researchHelpMarriage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1. Review the record hints in FamilySearch for both [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) and [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}).
1. Do broad searches on popular genealogy websites using the links below or using the [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en) Chrome Extension.
1. Ask for help at the [Genealogy and Family History](http://genealogy.stackexchange.com/) Stack Exchange website.
1. Visit a local [Family History Center](https://familysearch.org/ask/help#localResource).
1. Hire a researcher from the [Genlighten](http://www.genlighten.com/) community.
2 changes: 1 addition & 1 deletion lang/es/fs-check-es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lang/es/lib/check-titles.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"title": "Posibles personas duplicadas"
},
"recordHints": {
"title": "Pistas de registro"
"title": "Registros sugeridos"
},
"standardizeBirthDate": {
"title": "Estandarizar una fecha de nacimiento"
Expand Down
6 changes: 1 addition & 5 deletions lang/es/lib/checks/missingMarriageDate.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ El [matrimonio](https://familysearch.org/tree/#view=coupleRelationship&relations
entre [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) y [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}) no tiene fecha de matrimonio.
Intente estos pasos para encontrar la fecha del matrimonio:

1. Revise las pistas de registro en FamilySearch tanto para [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) como para [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}).
1. Realice búsquedas amplias en los sitios web de genealogía populares utilizando los enlaces de abajo o utilizando la extensión de Chrome [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en).
1. Pida ayuda en la página web de [genealogía e historia familiar](http://genealogy.stackexchange.com/).
1. Visite un [centro de historia familiar] local (https://familysearch.org/ask/help#localResource).
1. Contrate a un investigador de la comunidad [Genlighten](http://www.genlighten.com/).
{{> researchHelpMarriage}}
6 changes: 1 addition & 5 deletions lang/es/lib/checks/missingMarriageFact.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ El [matrimonio](https://familysearch.org/tree/#view=coupleRelationship&relations
entre [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) y [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}) no tiene fecha de matrimonio.
Intente estos pasos para encontrar la fecha del matrimonio:

1. Revise las pistas de registro en FamilySearch tanto para [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) como para [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}).
1. Realice búsquedas amplias en los sitios web de genealogía populares utilizando los enlaces de abajo o utilizando la extensión de Chrome [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en).
1. Pida ayuda en la página web de [genealogía e historia familiar](http://genealogy.stackexchange.com/).
1. Visite un [centro de historia familiar] local (https://familysearch.org/ask/help#localResource).
1. Contrate a un investigador de la comunidad [Genlighten](http://www.genlighten.com/).
{{> researchHelpMarriage}}
6 changes: 1 addition & 5 deletions lang/es/lib/checks/missingMarriagePlace.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ El [matrimonio](https://familysearch.org/tree/#view=coupleRelationship&relations
entre [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) y [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}) no tiene fecha de matrimonio.
Intente estos pasos para encontrar la fecha del matrimonio:

1. Revise las pistas de registro en FamilySearch tanto para [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) como para [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}).
1. Realice búsquedas amplias en los sitios web de genealogía populares utilizando los enlaces de abajo o utilizando la extensión de Chrome [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en).
1. Pida ayuda en la página web de [genealogía e historia familiar](http://genealogy.stackexchange.com/).
1. Visite un [centro de historia familiar] local (https://familysearch.org/ask/help#localResource).
1. Contrate a un investigador de la comunidad [Genlighten](http://www.genlighten.com/).
{{> researchHelpMarriage}}
6 changes: 1 addition & 5 deletions lang/es/lib/checks/missingMarriageSource.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Intente estos pasos para encontrar un registro matrimonial para [{{couple}}](https://familysearch.org/tree/#view=coupleRelationship&relationshipId={{cid}}):

1. Revise la pistas de registro para [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) y [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}) en FamilySearch.
1. Realice búsquedas amplias en los sitios web de genealogía populares utilizando los enlaces de abajo o utilizando la Extensión de Chrome [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en).
1. Busque ayuda en la página web de [genealogía e historia familiar] (http://genealogy.stackexchange.com/) Stack Exchange.
1. Visite un [centro de historia familiar] local (https://familysearch.org/ask/help#localResource).
1. Contrate a un investigador de la comunidad [Genlighten](http://www.genlighten.com/).
{{> researchHelpMarriage}}
2 changes: 1 addition & 1 deletion lang/es/lib/checks/possibleDuplicates.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FamilySearch ha identificado a la persona{{count}} {{#singular}}como potencial duplicado{{/singular}}
{{^singular}}personas como potenciales duplicados{{/singular}} de {{name}}.
Revise la [lista de duplicados](https://familysearch.org/tree/#view=possibleDuplicates&person={{pid}}) en FamilySearch.
Fusione las personas duplicadas y marque las coincidencias incorrectas como "No coincidente".
Combine las personas duplicadas y marque las coincidencias incorrectas como "No coincidente".
4 changes: 2 additions & 2 deletions lang/es/lib/checks/recordHints.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FamilySearch ha encontrado registros correspondientes para {{name}} en las siguientes colecciones:
FamilySearch ha encontrado registros sugeridos para {{name}} en las siguientes colecciones:

{{#titles}}
* {{.}}
{{/titles}}

[Revise estas correspondientes](https://familysearch.org/tree/#view=allMatchingRecords&person={{pid}}) y conecte las fuentes a su árbol.
[Revise estas registros sugeridos](https://familysearch.org/tree/#view=allMatchingRecords&person={{pid}}) y conecte las fuentes a su árbol.
4 changes: 2 additions & 2 deletions lang/es/lib/help-links.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"addingAndCorrecting": "Añadiendo y corrigiendo información en el árbol",
"customEvents": "Eventos y hechos personalizados",
"mergingDuplicates": "Fusionando personas duplicadas",
"mergingDuplicates": "Combinando personas duplicadas",
"nonexactDates": "Fechas aproximadas",
"parentRelationshipType": "Actualizando tipo de relación paternofilial",
"recordHints": "Revisando indicios de registros",
"recordHints": "Revisando registros sugeridos",
"standardizing": "Estandarizando fechas y lugares"
}
6 changes: 3 additions & 3 deletions lang/es/lib/partials/researchHelp.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1. Revise las [pistas de registro] (https://familysearch.org/tree/#view=allMatchingRecords&person={{pid}}) en FamilySearch.
1. Revise [los registros sugeridos](https://familysearch.org/tree/#view=allMatchingRecords&person={{pid}}) en FamilySearch.
1. Realice búsquedas amplias en los sitios web de genealogía populares utilizando los enlaces de abajo o utilizando la Extensión de Chrome [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en).
1. Busque ayuda en la página web de [genealogía e historia familiar] (http://genealogy.stackexchange.com/) Stack Exchange.
1. Visite un [centro de historia familiar] local (https://familysearch.org/ask/help#localResource).
1. Busque ayuda en la página web de [genealogía e historia familiar](http://genealogy.stackexchange.com/) Stack Exchange.
1. Visite un [centro de historia familiar local](https://familysearch.org/ask/help#localResource).
1. Contrate a un investigador de la comunidad [Genlighten](http://www.genlighten.com/).
5 changes: 5 additions & 0 deletions lang/es/lib/partials/researchHelpMarriage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1. Revise los registros sugeridos en FamilySearch tanto para [{{wifeName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{wid}}) como para [{{husbandName}}](https://familysearch.org/tree/#view=allMatchingRecords&person={{hid}}).
1. Realice búsquedas amplias en los sitios web de genealogía populares utilizando los enlaces de abajo o utilizando la extensión de Chrome [RootsSearch](https://chrome.google.com/webstore/detail/rootssearch/aolcffalbhpnojekmimmelebjchjmmgn?hl=en).
1. Busque ayuda en la página web de [genealogía e historia familiar](http://genealogy.stackexchange.com/).
1. Visite un [centro de historia familiar local](https://familysearch.org/ask/help#localResource).
1. Contrate a un investigador de la comunidad [Genlighten](http://www.genlighten.com/).
3 changes: 2 additions & 1 deletion test/lang/en.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var data = require('../../lang/en'),
var loadLang = require('../../lang/load-language'),
data = loadLang('en'),
expect = require('chai').expect;

describe('fs-check-en', function(){
Expand Down

0 comments on commit 1a817c3

Please sign in to comment.