chore: manual translations (#42811)
This commit is contained in:
committed by
GitHub
parent
a3395269a0
commit
c4fd49e5b7
@@ -2,6 +2,7 @@
|
||||
id: 5e601c0d5ac9d0ecd8b94afe
|
||||
title: American British Translator
|
||||
challengeType: 4
|
||||
forumTopicId: 462358
|
||||
dashedName: american-british-translator
|
||||
---
|
||||
|
||||
@@ -10,7 +11,7 @@ dashedName: american-british-translator
|
||||
Build a full stack JavaScript app that is functionally similar to this: <https://american-british-translator.freecodecamp.rocks/>. Working on this project will involve you writing your code using one of the following methods:
|
||||
|
||||
- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-project-american-british-english-translator/) and complete your project locally.
|
||||
- Use [our repl.it starter project](https://repl.it/github/freeCodeCamp/boilerplate-project-american-british-english-translator) to complete your project.
|
||||
- Use [our Replit starter project](https://replit.com/github/freeCodeCamp/boilerplate-project-american-british-english-translator) to complete your project.
|
||||
- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
|
||||
|
||||
When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
|
||||
@@ -21,8 +22,8 @@ When you are done, make sure a working demo of your project is hosted somewhere
|
||||
- Complete the `/api/translate` route in `/routes/api.js`
|
||||
- Create all of the unit/functional tests in `tests/1_unit-tests.js` and `tests/2_functional-tests.js`
|
||||
- See the JavaScript files in `/components` for the different spelling and terms your application should translate
|
||||
- To run the tests on Repl.it, set `NODE_ENV` to `test` without quotes in the `.env` file
|
||||
- To run the tests in the console, use the command `npm run test`. To open the Repl.it console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
|
||||
- To run the tests on Replit, set `NODE_ENV` to `test` without quotes in the `.env` file
|
||||
- To run the tests in the console, use the command `npm run test`. To open the Replit console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
|
||||
|
||||
Write the following tests in `tests/1_unit-tests.js`:
|
||||
|
||||
@@ -129,7 +130,7 @@ async (getUserInput) => {
|
||||
};
|
||||
```
|
||||
|
||||
The `/api/translate` route should also handle the way titles/honorifics are abbreviated in American and British English. For example, Doctor Wright is abbreviated as "Dr Wright" in British English and "Dr. Wright" in American English. See `/public/american-to-british-titles.js` for the different titles your application should handle.
|
||||
The `/api/translate` route should also handle the way titles/honorifics are abbreviated in American and British English. For example, Doctor Wright is abbreviated as "Dr Wright" in British English and "Dr. Wright" in American English. See `/components/american-to-british-titles.js` for the different titles your application should handle.
|
||||
|
||||
```js
|
||||
async (getUserInput) => {
|
||||
|
@@ -11,7 +11,7 @@ dashedName: issue-tracker
|
||||
Build a full stack JavaScript app that is functionally similar to this: <https://issue-tracker.freecodecamp.rocks/>. Working on this project will involve you writing your code using one of the following methods:
|
||||
|
||||
- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-project-issuetracker/) and complete your project locally.
|
||||
- Use [this repl.it starter project](https://repl.it/github/freeCodeCamp/boilerplate-project-issuetracker) to complete your project.
|
||||
- Use [this Replit starter project](https://replit.com/github/freeCodeCamp/boilerplate-project-issuetracker) to complete your project.
|
||||
- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
|
||||
|
||||
When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
|
||||
@@ -22,7 +22,7 @@ When you are done, make sure a working demo of your project is hosted somewhere
|
||||
- Create all of the functional tests in `tests/2_functional-tests.js`
|
||||
- Copy the `sample.env` file to `.env` and set the variables appropriately
|
||||
- To run the tests uncomment `NODE_ENV=test` in your `.env` file
|
||||
- To run the tests in the console, use the command `npm run test`. To open the Repl.it console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
|
||||
- To run the tests in the console, use the command `npm run test`. To open the Replit console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
|
||||
|
||||
Write the following tests in `tests/2_functional-tests.js`:
|
||||
|
||||
|
@@ -11,7 +11,7 @@ dashedName: metric-imperial-converter
|
||||
Build a full stack JavaScript app that is functionally similar to this: <https://metric-imperial-converter.freecodecamp.rocks/>. Working on this project will involve you writing your code using one of the following methods:
|
||||
|
||||
- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-project-metricimpconverter/) and complete your project locally.
|
||||
- Use [our repl.it starter project](https://repl.it/github/freeCodeCamp/boilerplate-project-metricimpconverter) to complete your project.
|
||||
- Use [our Replit starter project](https://replit.com/github/freeCodeCamp/boilerplate-project-metricimpconverter) to complete your project.
|
||||
- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
|
||||
|
||||
When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
|
||||
@@ -22,7 +22,7 @@ When you are done, make sure a working demo of your project is hosted somewhere
|
||||
- Complete the necessary routes in `/routes/api.js`
|
||||
- Copy the `sample.env` file to `.env` and set the variables appropriately
|
||||
- To run the tests uncomment `NODE_ENV=test` in your `.env` file
|
||||
- To run the tests in the console, use the command `npm run test`. To open the Repl.it console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
|
||||
- To run the tests in the console, use the command `npm run test`. To open the Replit console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
|
||||
|
||||
Write the following tests in `tests/1_unit-tests.js`:
|
||||
|
||||
@@ -66,7 +66,9 @@ getUserInput => {
|
||||
```
|
||||
|
||||
You can `GET` `/api/convert` with a single parameter containing an accepted number and unit and have it converted. (Hint: Split the input by looking for the index of the first character which will mark the start of the unit)
|
||||
|
||||
```js
|
||||
|
||||
```
|
||||
|
||||
You can convert `'gal'` to `'L'` and vice versa. (1 gal to 3.78541 L)
|
||||
|
@@ -11,15 +11,14 @@ dashedName: personal-library
|
||||
Build a full stack JavaScript app that is functionally similar to this: <https://personal-library.freecodecamp.rocks/>. Working on this project will involve you writing your code using one of the following methods:
|
||||
|
||||
- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-project-library) and complete your project locally.
|
||||
- Use [our repl.it starter project](https://repl.it/github/freeCodeCamp/boilerplate-project-library)) to complete your project.
|
||||
- Use [our Replit starter project](https://replit.com/github/freeCodeCamp/boilerplate-project-library) to complete your project.
|
||||
- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
|
||||
|
||||
When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
|
||||
|
||||
# --instructions--
|
||||
|
||||
1. Add your MongoDB connection string to `.env` without quotes as `DB`
|
||||
Example: `DB=mongodb://admin:pass@1234.mlab.com:1234/fccpersonallib`
|
||||
1. Add your MongoDB connection string to `.env` without quotes as `DB` Example: `DB=mongodb://admin:pass@1234.mlab.com:1234/fccpersonallib`
|
||||
2. In your `.env` file set `NODE_ENV` to `test`, without quotes
|
||||
3. You need to create all routes within `routes/api.js`
|
||||
4. You will create all functional tests in `tests/2_functional-tests.js`
|
||||
@@ -66,7 +65,7 @@ async (getUserInput) => {
|
||||
let a = $.post(url, { title: 'Faux Book A' });
|
||||
let b = $.post(url, { title: 'Faux Book B' });
|
||||
let c = $.post(url, { title: 'Faux Book C' });
|
||||
Promise.all([a, b, c]).then(async () => {
|
||||
await Promise.all([a, b, c]).then(async () => {
|
||||
let data = await $.get(url);
|
||||
assert.isArray(data);
|
||||
assert.isAtLeast(data.length, 3);
|
||||
@@ -214,8 +213,8 @@ async (getUserInput) => {
|
||||
|
||||
```js
|
||||
/**
|
||||
Backend challenges don't need solutions,
|
||||
because they would need to be tested against a full working project.
|
||||
Backend challenges don't need solutions,
|
||||
because they would need to be tested against a full working project.
|
||||
Please check our contributing guidelines to learn more.
|
||||
*/
|
||||
```
|
||||
|
@@ -2,6 +2,7 @@
|
||||
id: 5e601bf95ac9d0ecd8b94afd
|
||||
title: Sudoku Solver
|
||||
challengeType: 4
|
||||
forumTopicId: 462357
|
||||
dashedName: sudoku-solver
|
||||
---
|
||||
|
||||
@@ -10,7 +11,7 @@ dashedName: sudoku-solver
|
||||
Build a full stack JavaScript app that is functionally similar to this: <https://sudoku-solver.freecodecamp.rocks/>. Working on this project will involve you writing your code using one of the following methods:
|
||||
|
||||
- Clone [this GitHub repo](https://github.com/freecodecamp/boilerplate-project-sudoku-solver) and complete your project locally.
|
||||
- Use [our repl.it starter project](https://repl.it/github/freeCodeCamp/boilerplate-project-sudoku-solver) to complete your project.
|
||||
- Use [our Replit starter project](https://replit.com/github/freeCodeCamp/boilerplate-project-sudoku-solver) to complete your project.
|
||||
- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
|
||||
|
||||
When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
|
||||
@@ -24,7 +25,7 @@ When you are done, make sure a working demo of your project is hosted somewhere
|
||||
- All routing logic can go into `/routes/api.js`
|
||||
- See the `puzzle-strings.js` file in `/controllers` for some sample puzzles your application should solve
|
||||
- To run the challenge tests on this page, set `NODE_ENV` to `test` without quotes in the `.env` file
|
||||
- To run the tests in the console, use the command `npm run test`. To open the Repl.it console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
|
||||
- To run the tests in the console, use the command `npm run test`. To open the Replit console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
|
||||
|
||||
Write the following tests in `tests/1_unit-tests.js`:
|
||||
|
||||
@@ -39,7 +40,7 @@ Write the following tests in `tests/1_unit-tests.js`:
|
||||
- Logic handles an invalid region (3x3 grid) placement
|
||||
- Valid puzzle strings pass the solver
|
||||
- Invalid puzzle strings fail the solver
|
||||
- Solver returns the the expected solution for an incomplete puzzzle
|
||||
- Solver returns the expected solution for an incomplete puzzle
|
||||
|
||||
Write the following tests in `tests/2_functional-tests.js`
|
||||
|
||||
@@ -202,6 +203,25 @@ async (getUserInput) => {
|
||||
};
|
||||
```
|
||||
|
||||
If `value` submitted to `/api/check` is already placed in `puzzle` on that `coordinate`, the returned value will be an object containing a `valid` property with `true` if `value` is not conflicting.
|
||||
|
||||
```js
|
||||
async (getUserInput) => {
|
||||
const input =
|
||||
'..9..5.1.85.4....2432......1...69.83.9.....6.62.71...9......1945....4.37.4.3..6..';
|
||||
const coordinate = 'C3';
|
||||
const value = '2';
|
||||
const data = await fetch(getUserInput('url') + '/api/check', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ puzzle: input, coordinate, value })
|
||||
});
|
||||
const parsed = await data.json();
|
||||
assert.property(parsed, 'valid');
|
||||
assert.isTrue(parsed.valid);
|
||||
};
|
||||
```
|
||||
|
||||
If the puzzle submitted to `/api/check` contains values which are not numbers or periods, the returned value will be `{ error: 'Invalid characters in puzzle' }`
|
||||
|
||||
```js
|
||||
|
Reference in New Issue
Block a user