Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor translations.js #3090

Merged
merged 2 commits into from
Mar 1, 2021
Merged

refactor translations.js #3090

merged 2 commits into from
Mar 1, 2021

Conversation

peterbe
Copy link
Contributor

@peterbe peterbe commented Mar 1, 2021

(based on an offline (Slack) conversation)

@peterbe peterbe requested a review from fiji-flo March 1, 2021 17:31
Copy link
Contributor

@fiji-flo fiji-flo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to ignore/address my nit

server/index.js Outdated
@@ -47,7 +47,7 @@ async function buildDocumentFromURL(url) {
// When you're running the dev server and build documents
// every time a URL is requested, you won't have had the chance to do
// the phase that happens when you do a regular `yarn build`.
document.translations = findDocumentTranslations(document);
document.translations = findDocumentTranslationsByURL(document);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think findDocumentTranslationsByURL accepting a document is a little bit misleading maybe we wanna pass just document.url

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I'm glad you stopped me. Fixed now.

@peterbe peterbe requested a review from fiji-flo March 1, 2021 21:43
@peterbe
Copy link
Contributor Author

peterbe commented Mar 1, 2021

Oh I see. You approved but + nit. I'll merge.

@peterbe peterbe merged commit 87b69c1 into mdn:main Mar 1, 2021
@peterbe peterbe deleted the refactor-translationsjs branch March 1, 2021 22:22
peterbe added a commit to peterbe/yari that referenced this pull request Jun 1, 2021
* refactor translations.js

* feedback on name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants