This is a companion to the Story Publisher Adv Mobile App. The mobile app will likely be being used by someone in the place for whom a story is being translated; in contrast, this web app is for consultants to give feedback and approval for translations made by the mobile app. Usually the consultant does not know that target language, so the app must support an appropriate workflow.
The ROCC becomes involved in the translation process during the accuracy-checking phase of translation. When there is no on-site consultant who has been trained in translation principles, the accuracy-checking must be done remotely.
There are three phases to accuracy checking when the ROCC is involved.
- Story Back - someone who hasn't been involved in the translation listens to the entire story as many times as needed, and retells the story back in English. The goal is not to be entirely accurate, but just to get the basic parts of the story right. This stage requires the whole audio file for the story.
- Translate Back - on the mobile app, the translator records, potentially in small pieces, the English audio for each single slide in the story. The ROCC only receives a single audio file for this slide however. The consultant can listen to these slide recordings to see if they make sense. Recall that consultants may not know the language, so the only information they have is in English. In this stage, the consultant can validate each slides translation against the "Story Back" phase's big picture translation for anomalies.
- Accuracy Check - in this stage, the consultant and translator can chat with each other about issues that might have arisen during translation. Each slide has it's own chat window, and there is also a global chat window for any other discussion. The chat window should have read receipts of some form, perhaps explicitly send with a "resolve" button, or implicitly sent by simple visiting the page in the browser. The translator cannot continue with translation until the consultant sends an approval for every slide in the story.
Developed by 2017-2018 Cedarville University CS Senior Design team with continuing development by 2018-2019 CS Senior Design team.
Currently being developed by 2019-2020 CS Senior Design Team.
The project uses Composer, a package manager for php (eventually we may remove the need for any dependencies, but for now this is necessary). The linked site has information on how to Download and install.
To setup the project,
- Clone this repository and
cdinto the new directory. - Run
php composer.phar installfrom within the newly cloned directory. You may need to modify this command based on how you installed composer. - Run
find . -type f -exec chmod 644 -- {} +,find . -type d -exec chmod 755 -- {} +, andchmod Files -type d -exec chmod 777 -- {} +from within your clone directory to make directories and files accessible to the web server. Be careful that you do not run this command somewhere unintended. So that you do not have to remember or re-copy these commands frequently, there is a script calledreset_file_permissions.shwhich you can will update file permissions for you. - Edit the variables in
API/utils/ConnectionSettings.phpto match the correct values for your database.
For any development setup, there will be an SQL database that the server
interacts with. In this repository, there is a docs/new-schema.sql file that
contains SQL to delete existing tables and create new tables. In addition,
there is a docs/seed.sql file which contains SQL statements to add some
testing data to the database.
During testing and development, likely the database will change due to
interaction with the database. If some things happen that put the database in a
bad state, or for some reason you want to reset the database back to how it
started, there is a file called rebuild-db.sh. To run it, you need to specify
the username and database that you want to reload; that is, you would execute a
command of the form sh rebuild-db.sh username password substituting the
appropriate things for username and password of course.
If you have more data that you think is useful to always have around for
development, make sure to edit the docs/seed.sql file and add some INSERT
statements. Otherwise, the next time someone runs rebuild-db.sh, all data
will be deleted and reset to only what is described in docs/seed.sql.
Follow these guidelines as much as possible:
- For every change in the repo, make a new branch for the feature with a name
describing the feature. (i.e. Don't name it
my-branch-3) - Work on small features; if a feature is very large, figure out how to make it
into smaller features. This makes it possible for you to push your code more
quickly back into the main
developbranch; in addition, it also makes it easier for other team members to review and understand your changes. - Branch directly off of
developmostly. If you have a feature which has not yet been merged intodevelopand a second feature which depends on this feature, don't fret! Just branch from the feature that is waiting to be merged. - Keep changes within a branch mostly unified around the feature that the branch is about.
developshould always be in a working state.
The phone keeps track of the directory containing all the templates. When work
begins to translate a specific template, the app creates a project/ directory
inside the template's directory. Inside this project/ directory, there is a
story.json file that gets created. This file stores all the data related to
upload status, and what the names of back translation audio files is; in fact,
it stores everything related to the story, including the information that the
template's project.xml contained. Thus, there is no proper database and SQLite
usage, but rather an auto-saved JSON file.
MySQL database holds user, template, and project info. Web application intended to be run on Apache Web Server. HTML/CSS/JS frontend with PHP api and backend and MySQL DB
Before running the tests, ensure that the following prerequisites are met:
The tests depend on specific values retrieved from the API/utils/ConnectionSettings.php file:
- Utilize the
DB_DNSconstant in the file for the database name and server host information in the database connection. - Access the global variables
$databaseUserand$databasePasswordfor authentication. $filesRootvariable for Root file location in order to write story data
Tests used the database connection settings API/utils/ConnectionSettings.php file.
$filesRoot variable from API/utils/ConnectionSettings.php file is used by tests
- The tests rely on the
docs/new-schema.sqlanddocs/seed.sqlfiles. - In particular, the
docs/seed.sqlfile contains essential data for theProjectstable, utilized by the tests. - If tests encounter failures due to changes in the data, ensure that the
PHONE_ID_#in following test files corresponds to theandroidIdcolumn value in theProjectstable:tests/integration/UploadSlideBackTranslationIntegrationTest.php.tests/integration/UploadWordLinkBackTranslation.php.
- The current
androidIdvalues used in the test file are:lmnopqghijklrstuvw
Navigate to the test story template within the project structure:
- Located within the
testsdirectory, the test story template resides in thetests/data/templatesdirectory. - The structure of the story template is as follows:
story_1serves as the story template in the test file. Ensure its alignment with theSTORY_TEMPLATEconstant declared in the test file.- Within the
story_1/projectdirectory, find a file namedstory.jsoncontaining information about the story slide. Note: Do not alter the filename. - The
slideTypeset toCOPYRIGHTis not processed byUploadSlideBacktranslation.php.
- Language-specific data for the template can be found in the
tests/data/templates/esdirectory, maintaining the same overall structure.
- Ensure that all dependencies are installed by running:
php composer.phar install
- Execute tests using the following command:
./vendor/bin/phpunit --testdox --no-coverage