From e0cfd43f77b5646a953c3a75a768b82198036962 Mon Sep 17 00:00:00 2001 From: manisha Date: Aug 02 2021 12:42:00 +0000 Subject: [PATCH 1/11] added translation --- diff --git a/package.json b/package.json index b9a180b..e48dee4 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,17 @@ "@babel/runtime": "^7.14.0", "clsx": "^1.1.1", "dateformat": "^3.0.3", + "i18n-js": "^3.8.0", + "i18next": "^20.3.5", + "i18next-browser-languagedetector": "^6.1.2", + "i18next-http-backend": "^1.3.0", "nanoid": "^3.1.22", "query-string": "^7.0.0", "ramda": "^0.27.1", "react": "^16.5.2", "react-animate-on-scroll": "^2.1.5", "react-dom": "^16.5.2", + "react-i18next": "^11.11.4", "react-redux": "^7.2.1", "react-router-dom": "^5.2.0", "react-scripts": "^3.3.0", diff --git a/src/App.js b/src/App.js index e04e484..c591221 100644 --- a/src/App.js +++ b/src/App.js @@ -1,4 +1,4 @@ -import React from "react" +import React, { useEffect } from "react" import { Route, Switch } from "react-router" import { BrowserRouter } from "react-router-dom" @@ -6,7 +6,16 @@ import { BrowserRouter } from "react-router-dom" import Wizard from "./wizard/Wizard" import LandingPage from "./landingpage/LandingPage" import NotFound from "./NotFound" +import { useDispatch } from "react-redux" +import { changeLanguage } from "./actions/reduxActions" const App = () => { + const dispatch = useDispatch() + + useEffect(() => { + const lang = localStorage.getItem("locale") || "en" + dispatch(changeLanguage(lang)) + }, []) + return ( diff --git a/src/NotFound.js b/src/NotFound.js index 9790a44..86ffa11 100644 --- a/src/NotFound.js +++ b/src/NotFound.js @@ -2,8 +2,11 @@ import React from "react" import Layout from "./layout/Layout" import { Link } from "react-router-dom" import { Container } from "reactstrap" +import { useSelector } from "react-redux" const Wizard = () => { + const { i18n } = useSelector((state) => state.locale) + return ( @@ -14,7 +17,7 @@ const Wizard = () => { 😢 - Go to home page + {i18n.t("phrases.go_to_home")}

diff --git a/src/actions/reduxActions.js b/src/actions/reduxActions.js index 1c96a21..b32bffc 100644 --- a/src/actions/reduxActions.js +++ b/src/actions/reduxActions.js @@ -85,3 +85,8 @@ export const toggleLandingPageModal = (status) => ({ type: ActionTypes.TOGGLE_LANDING_PAGE_MODAL, payload: status, }) + +export const changeLanguage = (lang) => ({ + type: ActionTypes.CHANGE_LANGUAGE, + payload: lang, +}) diff --git a/src/constants/index.js b/src/constants/index.js index 7b60f04..f78a042 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -6,4 +6,5 @@ export default { UPDATE_LANDING_PAGE_API_CALL_STATUS: "UPDATE_LANDING_PAGE_API_CALL_STATUS", UPDATE_WIZARD_API_CALL_STATUS: "UPDATE_WIZARD_API_CALL_STATUS", TOGGLE_LANDING_PAGE_MODAL: "TOGGLE_LANDING_PAGE_MODAL", + CHANGE_LANGUAGE: "CHANGE_LANGUAGE", } diff --git a/src/index.css b/src/index.css index 44491a1..aef45f7 100644 --- a/src/index.css +++ b/src/index.css @@ -279,3 +279,11 @@ ol.steps > li { .bottom-padding { margin-bottom: 5px; } + +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-flex; + vertical-align: middle; + padding-left: 39em; +} diff --git a/src/index.js b/src/index.js index ca0b333..55cbe3c 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,6 @@ import "typeface-open-sans" import App from "./App" import * as serviceWorker from "./serviceWorker" - import { createStore, applyMiddleware, compose } from "redux" import thunkMiddleware from "redux-thunk" import { createLogger } from "redux-logger" diff --git a/src/landingpage/Blockers.js b/src/landingpage/Blockers.js index 95e71bf..1cd815a 100644 --- a/src/landingpage/Blockers.js +++ b/src/landingpage/Blockers.js @@ -2,23 +2,26 @@ import React from "react" import { Row, Card, CardBody } from "reactstrap" import SourceLink from "./SourceLink" import BugStats from "./common/BugStats" +import { useSelector } from "react-redux" const Blockers = (props) => { + const { i18n } = useSelector((state) => state.locale) + + console.log(i18n.t("phrases.blockers_and_FEs")) + return ( - props.data && ( - - -

- Fedora {props.release} blockers and FEs{" "} - -

- - - - -
-
- ) + + +

+ Fedora {props.release} {i18n.t("phrases.blockers_and_FEs")}{" "} + +

+ + + + +
+
) } diff --git a/src/landingpage/Events.js b/src/landingpage/Events.js index 4b3f87e..05991da 100644 --- a/src/landingpage/Events.js +++ b/src/landingpage/Events.js @@ -2,8 +2,11 @@ import React from "react" import dateFormat from "dateformat" import SourceLink from "./SourceLink" import { Card, CardBody, Row, Col } from "reactstrap" +import { useSelector } from "react-redux" const Events = (props) => { + const { i18n } = useSelector((state) => state.locale) + const meetings = props.data.map((meeting) => { const old = new Date(meeting.start) var date = old.getDate() @@ -28,7 +31,7 @@ const Events = (props) => {

- Meetings and testdays in the next 7 days{" "} + {i18n.t("phrases.Meetings_and_testdays_in_the_next_7_days")}{" "}

diff --git a/src/landingpage/LandingPage.js b/src/landingpage/LandingPage.js index 7f2b89f..bcd136b 100644 --- a/src/landingpage/LandingPage.js +++ b/src/landingpage/LandingPage.js @@ -21,6 +21,7 @@ import { loadData, toggleLandingPageModal } from "../actions/reduxActions" import Cookies from "universal-cookie" const LandingPage = () => { + const { i18n } = useSelector((state) => state.locale) const cookies = new Cookies() let available_components = ["events", "blockers", "minutes"] let enabled_components = cookies.get("landingpage_enabled_components") @@ -109,7 +110,7 @@ const LandingPage = () => { {components} - Visibility Configuration + {i18n.t("phrases.visibility_configuration")} {available_components.map((item) => ( @@ -124,10 +125,10 @@ const LandingPage = () => { />{" "} @@ -136,7 +137,7 @@ const LandingPage = () => { @@ -148,7 +149,7 @@ const LandingPage = () => { className="pad btn btn-primary btn-block btn-wrap-text btn-lg active" to="/wizard" role="button"> - Click here, and help us make Fedora better! + {i18n.t("phrases.do_you_have_some_spare_time")} diff --git a/src/landingpage/Minutes.js b/src/landingpage/Minutes.js index 57d4249..5c7d7e0 100644 --- a/src/landingpage/Minutes.js +++ b/src/landingpage/Minutes.js @@ -1,6 +1,9 @@ import React from "react" +import { useSelector } from "react-redux" import { Card, CardBody } from "reactstrap" const Events = (props) => { + const { i18n } = useSelector((state) => state.locale) + const old = props.data.date let date = old.slice(0, 10) @@ -12,20 +15,20 @@ const Events = (props) => { return ( -

Fedora QA Meeting Minutes

+

{i18n.t("phrases.Fedora_QA_Meeting_Minutes")}

Latest minutes from {dating} {timing}
- Visit{" "} + {i18n.t("words.Visit")}{" "} meetbot {" "} - to see older. + {i18n.t("phrases.to_see_older")}.
diff --git a/src/landingpage/Timeline.js b/src/landingpage/Timeline.js index 0ebeb64..4ad0ff1 100644 --- a/src/landingpage/Timeline.js +++ b/src/landingpage/Timeline.js @@ -1,22 +1,21 @@ import React, { useState } from "react" +import { useSelector } from "react-redux" import { Card, CardBody, Tooltip } from "reactstrap" import SourceLink from "./SourceLink" const Timeline = (props) => { + const { i18n } = useSelector((state) => state.locale) + const [tooltipOpen, setTooltipOpen] = useState(false) const toggle = () => setTooltipOpen(!tooltipOpen) const get_title = (summary) => { summary = summary.toLowerCase() - if (summary.includes("freeze")) - return "At the milestone freeze, pushes from the updates-testing to the stable repository are suspended until the release candidate is accepted." - if (summary === "rawhide") - return "Next Fedora release hasn't been branched yet from rolling release branch." - if (summary.includes("branch")) - return "Next version of Fedora that was 'branched' from the rolling Rawhide tree and in the future will become the next stable Fedora release." - if (summary.includes("release")) - return "Release candidate was accepted (violating no milestone criteria) and was released." + if (summary.includes("freeze")) return i18n.t("phrases.freeze_Text") + if (summary === "rawhide") return i18n.t("phrases.Rawhide_Text") + if (summary.includes("branch")) return i18n.t("phrases.branch_Text") + if (summary.includes("release")) return i18n.t("phrases.release_Text") } const line = props.data.map((milestone) => { @@ -47,7 +46,7 @@ const Timeline = (props) => {

- Current development schedule{" "} + {i18n.t("phrases.current_development_schedule")}{" "} @@ -56,7 +55,7 @@ const Timeline = (props) => { isOpen={tooltipOpen} target="TooltipExample" toggle={toggle}> - This is a timeline of current Fedora release schedule + {i18n.t("phrases.timeline_Text")} {" "}

diff --git a/src/landingpage/common/BugStats.js b/src/landingpage/common/BugStats.js index 30aa810..0d42fae 100644 --- a/src/landingpage/common/BugStats.js +++ b/src/landingpage/common/BugStats.js @@ -1,9 +1,12 @@ import React from "react" +import { useSelector } from "react-redux" import { Table, Col } from "reactstrap" const BugStats = (props) => { const { milestone, stats } = props + const { i18n } = useSelector((state) => state.locale) + return ( @@ -18,19 +21,19 @@ const BugStats = (props) => { {stats && ( <> - + - + - + - + diff --git a/src/layout/Footer.js b/src/layout/Footer.js index f6cd591..f1447ac 100644 --- a/src/layout/Footer.js +++ b/src/layout/Footer.js @@ -1,16 +1,18 @@ -import React, { Component } from "react" +import React from "react" +import { useSelector } from "react-redux" -class Footer extends Component { - render() { - return ( -
-
- Source on Pagure{" "} - version 0.1.0 -
+const Footer = () => { + const { i18n } = useSelector((state) => state.locale) + + return ( +
+
+ {i18n.t("words.source")}{" "} + {i18n.t("phrases.on_Pagure")}{" "} + {i18n.t("words.version")} 0.1.0
- ) - } +
+ ) } export default Footer diff --git a/src/layout/Masthead.js b/src/layout/Masthead.js index 6b54173..e428a46 100644 --- a/src/layout/Masthead.js +++ b/src/layout/Masthead.js @@ -1,16 +1,34 @@ -import React from "react" +import React, { useState } from "react" import { Link, useLocation } from "react-router-dom" -import { Container, NavbarBrand, Navbar, Button } from "reactstrap" +import { + Container, + NavbarBrand, + Navbar, + Button, + Dropdown, + DropdownToggle, + DropdownMenu, + DropdownItem, + ButtonDropdown, +} from "reactstrap" import { API_CALL_STATUS_VALUES } from "../constants/ProjectConstants" import { ROUTE } from "../constants/Routes" import logo from "./logo.png" -import { loadData, loadWizardData, toggleLandingPageModal } from "../actions/reduxActions" +import { + changeLanguage, + loadData, + loadWizardData, + toggleLandingPageModal, +} from "../actions/reduxActions" import { shallowEqual, useDispatch, useSelector } from "react-redux" const selectWizardFromStore = (state) => state.wizard.api_call_status const selectLandingPageFromStore = (state) => state.landing_page.api_call_status const Masthead = () => { + const { i18n } = useSelector((state) => state.locale) + const [dropdownOpen, setDropdownOpen] = useState(false) + const location = useLocation() const dispatch = useDispatch() @@ -48,6 +66,12 @@ const Masthead = () => { dispatch(toggleLandingPageModal(modalState)) } + const handleClick = (lang) => { + dispatch(changeLanguage(lang)) + } + + const toggle = () => setDropdownOpen((prevState) => !prevState) + return ( @@ -56,6 +80,16 @@ const Masthead = () => { + {ROUTE.LANDING_PAGE === location.pathname && ( + + {i18n.t("phrases.select_language")} + + handleClick("en")}> + {i18n.t("words.english")} + + + + )}
{api_call_status() === API_CALL_STATUS_VALUES.STARTED || api_call_status() === API_CALL_STATUS_VALUES.RETRYING ? ( @@ -65,7 +99,7 @@ const Masthead = () => { - Retrying + {i18n.t("words.Retrying")} )} @@ -78,7 +112,7 @@ const Masthead = () => { - Failed to fetch data! + {i18n.t("phrases.Failed_to_fetch_data")} {handleRetry && (
- None of the above looks interesting to you? We'd be happy if you looked around at{" "} + {i18n.t("phrases.None_of_the_above_looks_interesting_to_you")}{" "} https://whatcanidoforfedora.org/!
diff --git a/src/wizard/WizardNavigation.js b/src/wizard/WizardNavigation.js index 0e97b99..add31a1 100644 --- a/src/wizard/WizardNavigation.js +++ b/src/wizard/WizardNavigation.js @@ -7,7 +7,7 @@ import * as R from "ramda" function WizardNavigation(props) { const query = useParams() - + const { i18n } = useSelector((state) => state.locale) const { step } = props const selectAction = (state) => state.wizard.all_actions @@ -59,24 +59,24 @@ function WizardNavigation(props) { createBreadcrumbItem( "Duration", step.slice(-1) > "2" ? "enable" : "disabled", - query.duration === "few_hours" ? "Few Hours" : "Several Days" + query.duration === "few_hours" ? i18n.t("phrases.Few_hours") : i18n.t("phrases.Several_days") ), createBreadcrumbItem( "Provider", step.slice(-1) > "3" ? "enable" : "disabled", query.provider === "fedora_manual_testing" - ? "Fedora Manual Testing" + ? i18n.t("phrases.Fedora_Manual_Testing") : query.provider === "easyfix" - ? "Easyfix" - : "Bodhi Karma" + ? i18n.t("words.Easyfix") + : i18n.t("phrases.Bodhi_Karma") ), createBreadcrumbItem( "Actions", step.slice(-1) > "4" ? "enable" : "disabled", query.action === "manual_testing" - ? "Manual Testing" + ? i18n.t("words.Manual_Testing") : query.action === "beginner_guide" - ? "Beginner Guide" + ? i18n.t("words.Beginner_Guide") : query.action ? getTags().filter((a) => a.toLowerCase() === decodeURIComponent(query.action))[0] || query.action.charAt(0).toUpperCase() + query.action.slice(1) diff --git a/src/wizard/step/Step1.js b/src/wizard/step/Step1.js index cd6ae98..6fa7453 100644 --- a/src/wizard/step/Step1.js +++ b/src/wizard/step/Step1.js @@ -1,8 +1,10 @@ import React, { useState } from "react" +import { useSelector } from "react-redux" import { useHistory } from "react-router-dom" import { Card, CardText, Col, Row } from "reactstrap" const Step1 = (props) => { + const { i18n } = useSelector((state) => state.locale) const [selectedItem, setItem] = useState() const history = useHistory() const handleStep = (option) => { @@ -23,9 +25,9 @@ const Step1 = (props) => { handleStep("few_hours") }}>

- Few Hours + {i18n.t("phrases.Few_hours")}

- Task that can take up to Few Hours + {i18n.t("phrases.Task_that_can_take_up_to_Few_Hours")} @@ -40,9 +42,9 @@ const Step1 = (props) => { handleStep("several_days") }}>

- Several Days + {i18n.t("phrases.Several_days")}

- Task that can take up to Several Days + {i18n.t("phrases.Task_that_can_take_up_to_Several_Days")} diff --git a/src/wizard/step/Step3.js b/src/wizard/step/Step3.js index 74787c8..90f9220 100644 --- a/src/wizard/step/Step3.js +++ b/src/wizard/step/Step3.js @@ -8,6 +8,7 @@ import { useHistory } from "react-router" const Step3 = (props) => { const { query } = props + const { i18n } = useSelector((state) => state.locale) const [selectedItem, setItem] = useState() const history = useHistory() @@ -60,8 +61,8 @@ const Step3 = (props) => { handleStep("beginner_guide") }}> -

I'm a complete beginner

- please guide to me this +

{i18n.t("phrases.Im_a_complete_beginner")}

+ {i18n.t("phrases.please_guide_to_me_this")}
@@ -72,8 +73,8 @@ const Step3 = (props) => { handleStep("manual_testing") }}> -

I've already done this

- Show me the test cases +

{i18n.t("phrases.Ive_already_done_this")}

+ {i18n.t("phrases.Show_me_the_test_cases")}
diff --git a/src/wizard/step/Step4.js b/src/wizard/step/Step4.js index 6b7b3ca..63c2a5a 100644 --- a/src/wizard/step/Step4.js +++ b/src/wizard/step/Step4.js @@ -7,6 +7,7 @@ import Manual from "../Manual" const Step4 = (props) => { const { query } = props + const { i18n } = useSelector((state) => state.locale) const history = useHistory() @@ -88,64 +89,59 @@ const Step4 = (props) => { case "Installation": return (
- The Installation testcases generally deal with a part of the - installation procedure. + {i18n.t("words.the")} {i18n.t("words.Installation")}{" "} + {i18n.t("phrases.Installation_text")}
- You will certainly need an installation ISO, and either a Virtual or Bare-metal machine - to run the test. + {i18n.t("phrases.Installation_text1")}
- Note: some (not that many, though) of these testcases require Bare-metal - machine. Be sure to read the Description of the testcase carefully. + {i18n.t("words.Note")} {i18n.t("phrases.Installation_text2")}
) case "Desktop": return (
- The Desktop testcases cover basic functionality of the desktop - environment. + {i18n.t("words.the")} {i18n.t("words.Desktop")}{" "} + {i18n.t("phrases.Desktop_text")}
- You can either install Fedora onto clean Virtual or Bare-metal machine, or use a Live - image instead. + {i18n.t("phrases.Desktop_text1")}
) case "Base": return (
- The Base testcases cover the system's basic functionality just - after a clean installation. + {i18n.t("words.the")} {i18n.t("words.Base")}{" "} + {i18n.t("phrases.base_text")}
- Most times, you will be asked to perform a clean Fedora installation. You can use - either Virtual or Bare-metal machine. + {i18n.t("phrases.base_text1")}
- Pro tip: using a snapshot of cleanly installed Virtual machine is just fine. No - need to reinstall for every testcase. + {i18n.t("phrases.Pro_tip")}: {i18n.t("phrases.base_text3")}
) case "Server": return (
- The Server testcases usually require multiple machines to test the - server-client behaviour, and might feel a bit advanced. + {i18n.t("words.the")} {i18n.t("words.Server")}{" "} + {i18n.t("phrases.Server_text")}
) case "Cloud": return (
- Even thought the Cloud testcases are best done in the specific - environments like EC2 or Openstack, you can also perform them locally using Testcloud. + {i18n.t("cloud_text")} {i18n.t("words.Cloud")}{" "} + {i18n.t("phrases.cloud_text1")}
- Have a look at the{" "} + {i18n.t("phrases.cloud_text2")}{" "} - Cloud provider setup + {i18n.t("phrases.Cloud_provider_setup")} {" "} - guides for more details. + {i18n.t("phrases.guides_for_more_details")}
) diff --git a/yarn.lock b/yarn.lock index 27a512e..d3601aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1136,6 +1136,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.12.0", "@babel/runtime@^7.14.5", "@babel/runtime@^7.14.6": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.8.tgz#7119a56f421018852694290b9f9148097391b446" + integrity sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.12.13", "@babel/template@^7.4.0", "@babel/template@^7.8.6": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" @@ -3273,6 +3280,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +cross-fetch@3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.4.tgz#9723f3a3a247bf8b89039f3a380a9244e8fa2f39" + integrity sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ== + dependencies: + node-fetch "2.6.1" + cross-spawn@7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14" @@ -5145,6 +5159,13 @@ html-minifier-terser@^5.0.1: relateurl "^0.2.7" terser "^4.6.3" +html-parse-stringify@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz#dfc1017347ce9f77c8141a507f233040c59c55d2" + integrity sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg== + dependencies: + void-elements "3.1.0" + html-webpack-plugin@4.0.0-beta.11: version "4.0.0-beta.11" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.11.tgz#3059a69144b5aecef97708196ca32f9e68677715" @@ -5244,6 +5265,32 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= +i18n-js@^3.8.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/i18n-js/-/i18n-js-3.8.0.tgz#b8fd6b12e1d88cb71f9806c29bca7c31c012e504" + integrity sha512-hDsGgPuvw/2P+lXSbOafAwspK8Ste8YrwuuUg17W3wEcO1JkQxBlPgsN1t2+852nTnz4YSYTjZc/1nAA2PC/nw== + +i18next-browser-languagedetector@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-6.1.2.tgz#68565a28b929cbc98ab6a56826ef2faf0e927ff8" + integrity sha512-YDzIGHhMRvr7M+c8B3EQUKyiMBhfqox4o1qkFvt4QXuu5V2cxf74+NCr+VEkUuU0y+RwcupA238eeolW1Yn80g== + dependencies: + "@babel/runtime" "^7.14.6" + +i18next-http-backend@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/i18next-http-backend/-/i18next-http-backend-1.3.0.tgz#fcafb9583cf2942a9c669bd1868ec84a11410536" + integrity sha512-49Sf7Dt6GHeFYlCcCTwD39bkaiw7ld8RlGCXw6ZERabN7SXaLM6qRGnd+XbFdPhJHNMHvt/38XiRtJcEgu5Arg== + dependencies: + cross-fetch "3.1.4" + +i18next@^20.3.5: + version "20.3.5" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-20.3.5.tgz#14308b79a3f1cafb24fdcd8e182d3673baf1e979" + integrity sha512-//MGeU6n4TencJmCgG+TCrpdgAD/NDEU/KfKQekYbJX6QV7sD/NjWQdVdBi+bkT0snegnSoB7QhjSeatrk3a0w== + dependencies: + "@babel/runtime" "^7.12.0" + iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -7075,6 +7122,11 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" +node-fetch@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + node-forge@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" @@ -8725,6 +8777,14 @@ react-error-overlay@^6.0.7: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.9.tgz#3c743010c9359608c375ecd6bc76f35d93995b0a" integrity sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew== +react-i18next@^11.11.4: + version "11.11.4" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.11.4.tgz#f6f9a1c827e7a5271377de2bf14db04cb1c9e5ce" + integrity sha512-ayWFlu8Sc7GAxW1PzMaPtzq+yiozWMxs0P1WeITNVzXAVRhC0Httkzw/IiODBta6seJRBCLrtUeFUSXhAIxlRg== + dependencies: + "@babel/runtime" "^7.14.5" + html-parse-stringify "^3.0.1" + react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" @@ -10634,6 +10694,11 @@ vm-browserify@^1.0.1: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== +void-elements@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09" + integrity sha1-YU9/v42AHwu18GYfWy9XhXUOTwk= + w3c-hr-time@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" From ad08dc196ff4997b42a7b82a848aa83c2a5f9f19 Mon Sep 17 00:00:00 2001 From: manisha Date: Aug 03 2021 13:30:13 +0000 Subject: [PATCH 2/11] fixed splits phrases and formatted strings --- diff --git a/src/App.js b/src/App.js index c591221..fb0eb5b 100644 --- a/src/App.js +++ b/src/App.js @@ -14,7 +14,7 @@ const App = () => { useEffect(() => { const lang = localStorage.getItem("locale") || "en" dispatch(changeLanguage(lang)) - }, []) + }, [dispatch]) return ( diff --git a/src/landingpage/Blockers.js b/src/landingpage/Blockers.js index 1cd815a..f716df8 100644 --- a/src/landingpage/Blockers.js +++ b/src/landingpage/Blockers.js @@ -7,8 +7,6 @@ import { useSelector } from "react-redux" const Blockers = (props) => { const { i18n } = useSelector((state) => state.locale) - console.log(i18n.t("phrases.blockers_and_FEs")) - return ( diff --git a/src/landingpage/Minutes.js b/src/landingpage/Minutes.js index 5c7d7e0..0f61424 100644 --- a/src/landingpage/Minutes.js +++ b/src/landingpage/Minutes.js @@ -18,7 +18,7 @@ const Events = (props) => {

{i18n.t("phrases.Fedora_QA_Meeting_Minutes")}

- Latest minutes from {dating} {timing} + {i18n.t("phrases.Latest_minutes_from")} {dating} {timing}
{i18n.t("words.Visit")}{" "} @@ -26,7 +26,7 @@ const Events = (props) => { target="_blank" href="https://meetbot.fedoraproject.org/sresults/?group_id=fedora-qa&type=team" rel="noopener noreferrer"> - meetbot + {i18n.t("words.meetbot")} {" "} {i18n.t("phrases.to_see_older")}.
diff --git a/src/layout/Masthead.js b/src/layout/Masthead.js index e428a46..bc889f2 100644 --- a/src/layout/Masthead.js +++ b/src/layout/Masthead.js @@ -5,7 +5,6 @@ import { NavbarBrand, Navbar, Button, - Dropdown, DropdownToggle, DropdownMenu, DropdownItem, diff --git a/src/translation/en.js b/src/translation/en.js index 64a06fb..ec7cebb 100644 --- a/src/translation/en.js +++ b/src/translation/en.js @@ -7,8 +7,10 @@ export default { Upgrade: "Upgrade", Miscellaneous: "Miscellaneous", Run: "Run", + Description: "Description", Note: "Note:", final: "Final", + Result: "Result", Visit: "Visit", enter: "Enter", notes: "Notes", @@ -22,6 +24,7 @@ export default { the: "The", Desktop: "Desktop", Base: "Base", + or: "or", Server: "Server", Cloud: "Cloud", Bodhi: "Bodhi", @@ -32,11 +35,83 @@ export default { Easyfix: "Easyfix", Manual_Testing: "Manual Testing", Beginner_Guide: "Beginner Guide", + meetbot: "meetbot", + primary: "primary", + See: "See!", + warning: "warning", + Expand: "Expand", + Workstation: "Workstation", + Minimal: "Minimal", + for_the: "for the", + Testcase: "Testcase", + Setup: "Setup", + here: "here", + missing_results: "missing results.", + web_interface: "web-interface", + relval: "relval", + matrix: "matrix", + Edit: "Edit", + danger: "danger", }, phrases: { + Tescase_matrix: "Tescase matrix", + I_found_a_bug: "I found a bug!", + result_fail_your: "result|fail|YOUR_NAME_HERE|BUG_NUMBER|", + if_you_dont_like_like_reading: + "If you don't feel like reading a wall of text, at least pot together a small document containing:", + Awesome_Ideally_read_up_on: " Awesome! Ideally read up on", + Study_the: "Study the", + package_first: " package first), or modify the", + directly_by_clicking_on_the: " directly by clicking on the", + result_pass_your: "result|pass|YOUR_NAME_HERE|", + link_next_to_the_Matrice_header_and_put: " link next to the Matrice's header, and put", + in_the_appropriate_spot: "in the appropriate spot.", + dont_have_an: "Don't have an IRC client?", + on_command_line: "on command line (make sure to install the", + relval_report_results: "relval report-results", + Great_Either_use: "Great! Either use", + Everything_went_well: "Everything went well", + should_give_you_a: "should give you a general idea of what is being tested", + if_you_are: " If you are not that familiar with IRC, you can use the", + The_testcase_structure_is_not_making_sense: "The testcase structure is not making sense?", + Get_your_hands: "Get your hands dirty, and test the hell out of it!", + Just_enter_a_Nickname: + "just enter a Nickname of your choice, #fedora-qa (including the hash sign) in the Channels field, and click Connect.", + The_testcases_are_generally_split_into_four_sections: + "The testcases are generally split into four sections:", + describes_the_steps: "describes the steps to take before you begin working on the testcase", + For_this_particular_testcase: "For this particular testcase,", + thoroughly_to_be_sure_you_know_what_to_do: " thoroughly, to be sure you know what to do.", Bodhi_Karma: "Bodhi Karma", + describes_you_to_check: + "describe what you should check while testing in order to decide whether it Passed of Failed", + How_to_test: "How to test", + based_on_the: "Based on the enviromnent, select and download and appropriate ISO", + contains_the_individual: + "contains the individual steps to take in order to perform the testcase", Show_me: "Show me", + Expected_results: "Expected results", + Maybe_you_are_stuck: + "Maybe you are stuck, or just do not understand something? Feel free to ask on our IRC channel #fedora-qa at freenode.net", + Column_which_usually: + "column, which usually means you can use any media/architecture available.", + testcases_but_you_can: "testcases, but you can also encouter a generic", + Have_a_look: + "Have a look at the matrix. The rows are the testcases, and the columns are the environments. Most of the time, these are", + missing_results: "missing results.", + Should_give_you: "should give you a general idea of what is being tested", + briefly_just: " briefly, just to have a general idea of what you will be doing.", + Read_the: " Read the", + Not_sure_what_that_means: "Not sure what that means?", + Not_making_much_sense: "Not making much sense?", + Column_which_actually: + "column, which usually means you can use any media/architecture available.", + ModalBadge: + " Have a look at the matrix. The rows are the testcases, and the columns are the environments. Most of the time, these are", + Identify_the_testcase_and_environment_in_our: + "Identify the testcase and `environment` in our ", Fedora_Manual_Testing: "Fedora Manual Testing", + Not_sure_what_Karma_means: "Not sure what Karma means?", Preperation_text: " Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISOLorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO Lorem ipsum some clever text where to get ISO", Installation_text0: @@ -50,6 +125,7 @@ export default { Test_Cases: "Test Cases", and_or: "and/or", fedora_easy_karma: "fedora-easy-karma", + fedora_Q_a: "

fkfhrry

", sections_in_the_detailed_output: "sections in the detailed output.", sudo_dnf_distro_sync: "sudo dnf distro-sync", Update_Feedback_Guidelines: " Update Feedback Guidelines", @@ -113,6 +189,9 @@ export default { IoT_Test_Day: "[F34] IoT Test Day", ARM_disk_images: "ARM disk images", Not_sure_how: "Not sure how?", + Make_sure_to: "Make sure to read about identifying the environment above.", + Most_of_the_time: + " Most of the time Workstation Live, or Server DVD are fine, but sometimes there are specific products (e.g. Xfce) to be tested", to_skip_it: "to skip it.", repo_by: " repo, by running ", the_name_of: " The name of the ISO image you used ", @@ -161,7 +240,7 @@ export default { users_or_automated: "Users (or automated systems) can then provide feedback in form of positive/negative Karma, marking the update as working (or not) within the scope of their expectations.", which_acts_as_a_gatekeeper: - "which acts as a gatekeeper between new package releases and the stable repositories. ", + ", which acts as a gatekeeper between new package releases and the stable repositories. Users (or automated systems) can then provide feedback in form of positive/negative Karma, marking the update as working (or not) within the scope of their expectations. An update can (and usually does) consist of several packages (rpms), that are going through the acceptance process together. ", Installation_repositories: "Installation repositories", Release_blocking_environments: "elease-blocking environments ", Default_boot_and_install: "Default boot and install (x86_64)", @@ -175,6 +254,7 @@ export default { Proposed_Blockers: "Proposed Blockers ", Need_some_tips: "Need some tips?", Sourceon_Pagure: "Sourceon Pagure", + Want_something_a_bit_nicer: "Want something a bit nicer?", version: "version 0.1.0", still_not_sure: "Still not sure? Just press ", when_you_test: "when you test a text-editor, or", @@ -192,7 +272,7 @@ export default { blockers_and_FEs: "blockers and FEs", Visit_meetbot_to_see_older: "Visit meetbot to see older.", current_development_schedule: "Current development schedule", - Latest_minutes_from: "Latest minutes from 2021-03-22-15.00", + Latest_minutes_from: "Latest minutes from", i_opened_a_couple: " I opened a couple of tabs, and browsed random pages.", Branch_Fedora_Linux_34_from_Rawhide: "Branch Fedora Linux 34 from Rawhide", Advanced_custom_storage_configuration: "Advanced custom storage configuration", diff --git a/src/wizard/Easyfix.js b/src/wizard/Easyfix.js index 1ddaa0f..390c40d 100644 --- a/src/wizard/Easyfix.js +++ b/src/wizard/Easyfix.js @@ -29,7 +29,11 @@ const EasyfixSection = (props) => { ) return ( - + ) @@ -41,7 +45,11 @@ const EasyfixSection = (props) => { ) return ( - + {subsections} ) @@ -65,7 +73,11 @@ const EasyfixSection = (props) => { )) return ( - + {links} ) diff --git a/src/wizard/FedoraEasyKarma.js b/src/wizard/FedoraEasyKarma.js index 3832782..7274f8a 100644 --- a/src/wizard/FedoraEasyKarma.js +++ b/src/wizard/FedoraEasyKarma.js @@ -10,19 +10,18 @@ export default (props) => {

{i18n.t("phrases.What_is_Karma")}

{i18n.t("phrases.Before_a_new_version_of_a_package")}{" "} - + {i18n.t("phrases.the_updates_are")}{" "} {i18n.t("words.Bodhi")} - , {i18n.t("phrases.which_acts_as_a_gatekeeper")} {i18n.t("phrases.users_or_automated")}{" "} - {i18n.t("phrases.an_update_can")} + {i18n.t("phrases.which_acts_as_a_gatekeeper")}

{i18n.t("phrases.sure_let_me_do_it")}

  1. {i18n.t("phrases.Fedora_Accounts_System")}{" "} - +
    • {i18n.t("words.Visit")}{" "} @@ -48,7 +47,7 @@ export default (props) => {
    • {i18n.t("phrases.choose_an_update")}{" "} - + {i18n.t("phrases.have_a_look_at")} {i18n.t("phrases.update_testing")} {i18n.t("phrases.repo_by")} @@ -67,7 +66,7 @@ export default (props) => { {i18n.t("words.Note")} {i18n.t("phrases.Other_packages_from")} {i18n.t("phrases.update_testing")} {i18n.t("phrases.repo_may_be_installed")}{" "} - + {i18n.t("phrases.somtimes_the_update")}.
      {i18n.t("words.Run")}{" "} @@ -76,7 +75,7 @@ export default (props) => { {i18n.t("phrases.Test_Cases")}, {i18n.t("phrases.and_or")}{" "} {i18n.t("words.notes")}{" "} {i18n.t("phrases.sections_in_the_detailed_output")}{" "} - + {i18n.t("phrases.we_already_mentioned_bodhi")}{" "} {i18n.t("phases.fedora-easy-karma")} {i18n.t("phrases.interface_for_submitting")} @@ -96,13 +95,13 @@ export default (props) => { {i18n.t("words.Run")} {i18n.t("phrases.fedora_easy_karma_fas_username_FAS_USERNAME")}{" "} {i18n.t("phrases.and_report_what_you_found_out")}{" "} - + {i18n.t("phrases.it_identifies")} {i18n.t("phrases.update_testing")}{" "} {i18n.t("phrases.repository_and_matches")}
      {i18n.t("phrases.you_are_then_presented")}{" "} - +
      1. {i18n.t("words.enter")} diff --git a/src/wizard/FedoraManualTesting.js b/src/wizard/FedoraManualTesting.js index aca861a..473f33a 100644 --- a/src/wizard/FedoraManualTesting.js +++ b/src/wizard/FedoraManualTesting.js @@ -1,4 +1,5 @@ import React, { useState } from "react" +import { useSelector } from "react-redux" import { Modal, ModalHeader, ModalBody, ModalFooter } from "reactstrap" import { CollapsableCard, ModalBadge } from "./components" @@ -22,6 +23,7 @@ const FedoraManualTestingItemsListSub2 = (props) => { } export function FedoraManualTestingItemsListSub1(props) { + const { i18n } = useSelector((state) => state.locale) var subsections = Object.keys(props.data).map((k) => (
      2. {k} @@ -34,65 +36,60 @@ export function FedoraManualTestingItemsListSub1(props) { switch (props.title) { case "Installation": l1 = ( -
        - The Installation testcases generally deal with a part of the - installation procedure. +
        + {i18n.t("words.the")} {i18n.t("words.Installation")}{" "} + {i18n.t("phrases.Installation_text")}
        - You will certainly need an installation ISO, and either a Virtual or Bare-metal machine - to run the test. + {i18n.t("phrases.Installation_text1")}
        - Note: some (not that many, though) of these testcases require Bare-metal machine. - Be sure to read the Description of the testcase carefully. + {i18n.t("words.Note")} {i18n.t("phrases.Installation_text2")}
        ) break case "Desktop": l1 = ( -
        - The Desktop testcases cover basic functionality of the desktop - environment. +
        + {i18n.t("words.the")} {i18n.t("words.Desktop")}{" "} + {i18n.t("phrases.Desktop_text")}
        - You can either install Fedora onto clean Virtual or Bare-metal machine, or use a Live - image instead. + {i18n.t("phrases.Desktop_text1")}
        ) break case "Base": l1 = ( -
        - The Base testcases cover the system's basic functionality just - after a clean installation. +
        + {i18n.t("words.the")} {i18n.t("words.Base")}{" "} + {i18n.t("phrases.base_text")}
        - Most times, you will be asked to perform a clean Fedora installation. You can use either - Virtual or Bare-metal machine. + {i18n.t("phrases.base_text1")}
        - Pro tip: using a snapshot of cleanly installed Virtual machine is just fine. No - need to reinstall for every testcase. + {i18n.t("phrases.Pro_tip")}: {i18n.t("phrases.base_text3")}
        ) break case "Server": l1 = ( -
        - The Server testcases usually require multiple machines to test the - server-client behaviour, and might feel a bit advanced. +
        + {i18n.t("words.the")} {i18n.t("words.Server")}{" "} + {i18n.t("phrases.Server_text")}
        ) break case "Cloud": l1 = ( -
        - Even thought the Cloud testcases are best done in the specific - environments like EC2 or Openstack, you can also perform them locally using Testcloud. +
        + {i18n.t("cloud_text")} {i18n.t("words.Cloud")}{" "} + {i18n.t("phrases.cloud_text1")}
        - Have a look at the{" "} + {i18n.t("phrases.cloud_text2")}{" "} - Cloud provider setup + {i18n.t("phrases.Cloud_provider_setup")} {" "} - guides for more details. + {i18n.t("phrases.guides_for_more_details")}
        ) break @@ -108,6 +105,7 @@ export function FedoraManualTestingItemsListSub1(props) { } export function FedoraManualTestingItem(props) { + const { i18n } = useSelector((state) => state.locale) const extra_data = props.data.extra_data const tc_url = extra_data.testcase_url @@ -126,21 +124,22 @@ export function FedoraManualTestingItem(props) { case "Base": environment_examples = ( - Workstation, Server, Xfce or Minimal + {i18n.t("words.Workstation")}, {i18n.t("words.Server")},{" "} + Xfce {i18n.t("words.or")} {i18n.t("words.Minimal")} ) break case "Desktop": environment_examples = ( - Workstation or KDE + {i18n.t("words.Workstation")} {i18n.t("words.or")} KDE ) break case "Server": environment_examples = ( - x86_64 or aarch64 + x86_64 {i18n.t("words.or")} aarch64 ) break @@ -154,84 +153,82 @@ export function FedoraManualTestingItem(props) {
        1. - Identify the testcase and `environment` in our{" "} + {i18n.t("phrases.Identify_the_testcase_and_environment_in_our")} - Tescase matrix + {i18n.t("phrases.Tescase_matrix")} {" "} - +
          • - Have a look at the matrix. The rows are the testcases, and the columns are the - environments. Most of the time, these are {environment_examples} for the {testtype}{" "} - testcases, but you can also encouter a generic Result column, which - usually means you can use any media/architecture available. + {i18n.t("phrases.ModalBadge")} {environment_examples} {i18n.t("words.for_the")}{" "} + {testtype} {i18n.t("phrases.testcase_but_you_can")}{" "} + {i18n.t("words.Result")} {i18n.t("phrases.Column_which_actually")}
          • - For this particular testcase, {extra_data.envs.join(", ")}{" "} - {extra_data.envs.length > 1 ? "environments are" : "environment is"} missing - results. + {i18n.t("phrases.For_this_particular_testcase")}{" "} + {extra_data.envs.join(", ")}{" "} + {extra_data.envs.length > 1 ? "environments are" : "environment is"}{" "} + {i18n.t("phrases.missing_results")}
        2. - Read the{" "} + {i18n.t("phrases.Read_the")}{" "} - Testcase + {i18n.t("words.Testcase")} {" "} - briefly, just to have a general idea of what you will be doing.{" "} - - The testcases are generally split into four sections: + {i18n.t("phrases.briefly_just")}{" "} + + {i18n.t("phrases.The_testcases_are_generally_split_into_four_sections")}
          • - Description should give you a general idea of what is being tested + {i18n.t("words.Description")} {i18n.t("phrases.Should_give_you")}
          • - Setup describes the steps to take before you begin working on the - testcase + {i18n.t("words.Setup")} {i18n.t("phrases.describes_the_steps")}
          • - How to test contains the individual steps to take in order to - perform the testcase + {i18n.t("phrases.How_to_test")}{" "} + {i18n.t("phrases.contains_the_individual")}
          • - Expected results describe what you should check while testing in - order to decide whether it Passed of Failed + {i18n.t("phrases.Expected_results")}{" "} + {i18n.t("phrases.describes_you_to_check")}
        3. - Based on the enviromnent, select and download and appropriate ISO{" "} + {i18n.t("phrases.based_on_the")}{" "} - here + {i18n.t("words.here")} .{" "} - +
            +
          • {i18n.t("phrases.Most_of_the_time")}
          • - Most of the time Workstation Live, or Server DVD are fine, but sometimes there are - specific products (e.g. Xfce) to be tested -
          • -
          • - Make sure to read about identifying the environment above.{" "} - + {i18n.t("phrases.Make_sure_to")}{" "} +
            • - Have a look at the matrix. The rows are the testcases, and the columns are - the environments. Most of the time, these are {environment_examples} for the{" "} - {testtype} testcases, but you can also encouter a generic Result{" "} - column, which usually means you can use any media/architecture available. + {i18n.t("phrases.Have_a_look")} {environment_examples}{" "} + {i18n.t("words.for_the")} {testtype}{" "} + {i18n.t("phrases.testcases_but_you_can")}{" "} + {i18n.t("words.Result")}{" "} + {i18n.t("phrases.Column_which_usually")}
            • - For this particular testcase, {extra_data.envs.join(", ")}{" "} - {extra_data.envs.length > 1 ? "environments are" : "environment is"} missing - results. + {i18n.t("phrases.For_this_particular_testcase")} + {extra_data.envs.join(", ")}{" "} + {extra_data.envs.length > 1 ? "environments are" : "environment is"}{" "} + {i18n.t("phrases.missing_results")}
            @@ -241,107 +238,104 @@ export function FedoraManualTestingItem(props) {
          • - Study the{" "} + {i18n.t("phrases.Study_the")}{" "} - Testcase + {i18n.t("words.Testcase")} {" "} - thoroughly, to be sure you know what to do.{" "} + {i18n.t("phrases.thoroughly_to_be_sure_you_know_what_to_do")}{" "}
            • - The testcase structure is not making sense?{" "} + {i18n.t("phrases.The_testcase_structure_is_not_making_sense")}{" "} - The testcases are generally split into four sections: + {i18n.t("phrases.The_testcases_are_generally_split_into_four_sections")}
              • - Description should give you a general idea of what is being - tested + {i18n.t("words.Description")}{" "} + {i18n.t("phrases.should_give_you_a")}
              • - Setup describes the steps to take before you begin working - on the testcase + {i18n.t("words.Setup")}{" "} + {i18n.t("phrases.describes_the_steps")}
              • - How to test contains the individual steps to take in order - to perform the testcase + {i18n.t("phrases.How_to_test")}{" "} + {i18n.t("phrases.contains_the_individual")}
              • - Expected results describe what you should check while - testing in order to decide whether it Passed of Failed + {i18n.t("phrases.Expected_results")}{" "} + {i18n.t("phrases.describes_you_to_check")}
            • - Maybe you are stuck, or just do not understand something? Feel free to ask on our - IRC channel #fedora-qa at freenode.net{" "} - - If you are not that familiar with IRC, you can use the{" "} + {i18n.t("phrases.Maybe_you_are_stuck")}{" "} + + {i18n.t("phrases.if_you_are")}{" "} - web-interface + {i18n.t("words.web_interface")} {" "} - just enter a Nickname of your choice, #fedora-qa (including the hash sign) in the - Channels field, and click Connect. + {i18n.t("phrases.Just_enter_a_Nickname")}
          • -
          • Get your hands dirty, and test the hell out of it!
          • +
          • {i18n.t("phrases.Get_your_hands")}
          • - - Great! Either use relval report-results on command line (make sure to - install the relval package first), or modify the{" "} + + {i18n.t("phrases.Great_Either_use")}{" "} + {i18n.t("phrases.relval_report_results")}{" "} + {i18n.t("phrases.on_command_line")} {i18n.t("words.relval")} + {i18n.t("phrases.package_first")}{" "} - matrix + {i18n.t("words.matrix")} {" "} - directly by clicking on the Edit link next to the Matrice's header, and - put {{result|pass|YOUR_NAME_HERE|}} in the appropriate - spot. + {i18n.t("phrases.directly_by_clicking_on_the")} {i18n.t("words.Edit")}{" "} + {i18n.t("phrases.link_next_to_the_Matrice_header_and_put")}{" "} + {{{i18n.t("phrases.result_pass_your")}}}{" "} + {i18n.t("phrases.in_the_appropriate_spot")} - - Awesome! Ideally read up on https://fedoraproject.org/wiki/How_to_file_a_bug_report + + {i18n.t("phrases.Awesome_Ideally_read_up_on")}{" "} + https://fedoraproject.org/wiki/How_to_file_a_bug_report
            - If you don't feel like reading a wall of text, at least pot together a small document - containing: + {i18n.t("phrases.if_you_dont_like_like_reading")}
              +
            • {i18n.t("phrases.brief_description_of_what")}
            • - Brief description of what went wrong (e.g. "QA:Testcase_dualboot_with_windows - - Bootloader does not show the Windows option") -
            • -
            • - The name of the ISO image you used (e.g. + {i18n.t("phrases.the_name_of")} (e.g. "Fedora-Server-netinst-i386-Rawhide-20181227.n.0.iso")
            • +
            • {i18n.t("phrases.note_what_you_did")}
            • +
            • {i18n.t("phrases.try_to_reproduce_the")}
            • - Note what you did, as precisely as possible, in a step-by-step fashion. Even - details like "Chose Polish as the languae for the installation process" can matter. -
            • -
            • - Try to reproduce the same state again based on the steps above (you can also - experiment a bit, and try to come up with just the critical steps) -
            • -
            • - Share your notes on the internet (you can use fpaste), and ask for help with filing - the bug report on our IRC channel #fedora-qa at freenode.net{" "} + {i18n.t("phrases.share_your_notes_on_the")}{" "} - If you are not that familiar with IRC, you can use the web-interface[link] just - enter a Nickname of your choice, #fedora-qa (including the hash sign) in the - Channels field, and click Connect. + {i18n.t("phrases.if_you_are_not_familiar")}
            - Once you get the Bug reported, make sure to also submit the result into the testing - matrix. Either use relval report-results on command line (make sure to - install the relval package first), or modify the{" "} + {i18n.t("phrases.once_you_get_the_bug_reported")}{" "} + {i18n.t("phrases.relval_report_results")}{" "} + {i18n.t("phrases.on_command_line")} {i18n.t("words.relval")}{" "} + {i18n.t("phrases.package_first")}{" "} - matrix + {i18n.t("words.matrix")} {" "} - directly by clicking on the Edit link next to the Matrice's header, and - put {{result|fail|YOUR_NAME_HERE|BUG_NUMBER|}} in the - appropriate spot. + {i18n.t("phrases.directly_by_clicking_on_the")} {i18n.t("words.Edit")}{" "} + {i18n.t("phrases.link_next_to_the_Matrice_header_and_put")}{" "} + {{{i18n.t("phrases.result_fail_your")}}}{" "} + {i18n.t("phrases.in_the_appropriate_spot")}
        From 74da40d44c2c7c4eb6c0d754b490ee1dae974c0d Mon Sep 17 00:00:00 2001 From: manisha Date: Aug 04 2021 10:29:57 +0000 Subject: [PATCH 3/11] selected language is added to the label --- diff --git a/src/index.css b/src/index.css index aef45f7..910c14b 100644 --- a/src/index.css +++ b/src/index.css @@ -285,5 +285,5 @@ ol.steps > li { position: relative; display: inline-flex; vertical-align: middle; - padding-left: 39em; + padding-right: 1em; } diff --git a/src/layout/Masthead.js b/src/layout/Masthead.js index bc889f2..8295705 100644 --- a/src/layout/Masthead.js +++ b/src/layout/Masthead.js @@ -1,4 +1,4 @@ -import React, { useState } from "react" +import React, { useEffect, useState } from "react" import { Link, useLocation } from "react-router-dom" import { Container, @@ -24,9 +24,17 @@ import { shallowEqual, useDispatch, useSelector } from "react-redux" const selectWizardFromStore = (state) => state.wizard.api_call_status const selectLandingPageFromStore = (state) => state.landing_page.api_call_status +const language = [ + { + lang: "en", + name: "english", + }, +] + const Masthead = () => { const { i18n } = useSelector((state) => state.locale) const [dropdownOpen, setDropdownOpen] = useState(false) + const [lang, setLang] = useState("") const location = useLocation() const dispatch = useDispatch() @@ -66,9 +74,15 @@ const Masthead = () => { } const handleClick = (lang) => { + setLang(lang) dispatch(changeLanguage(lang)) } + useEffect(() => { + const language = localStorage.getItem("locale") + setLang(language) + }, []) + const toggle = () => setDropdownOpen((prevState) => !prevState) return ( @@ -79,16 +93,7 @@ const Masthead = () => { - {ROUTE.LANDING_PAGE === location.pathname && ( - - {i18n.t("phrases.select_language")} - - handleClick("en")}> - {i18n.t("words.english")} - - - - )} +
        {api_call_status() === API_CALL_STATUS_VALUES.STARTED || api_call_status() === API_CALL_STATUS_VALUES.RETRYING ? ( @@ -119,6 +124,18 @@ const Masthead = () => { )} )} + {ROUTE.LANDING_PAGE === location.pathname && ( + + + {lang ? lang : i18n.t("phrases.select_language")} + + + {language.map((item) => ( + handleClick(item.lang)}>{item.name} + ))} + + + )} {ROUTE.LANDING_PAGE === location.pathname && (
  2. - {i18n.t("phrases.make_sure_your")} - {i18n.t("phrases.sudo_dnf_update_refresh")} + + Make sure your system is up-to-date: sudo dnf update --refresh +
  3. - {i18n.t("phrases.Install_fedora")} - {i18n.t("phrases.sudo_dnf_install_fedora_easy_karma")} + + Install fedora-easy-karma tool: sudo dnf install fedora-easy-karma +
  4. {i18n.t("phrases.choose_an_update")}{" "} - {i18n.t("phrases.have_a_look_at")} - {i18n.t("phrases.update_testing")} {i18n.t("phrases.repo_by")} - - {i18n.t("phrases.dnf_enablerepo_updates_testing_list_refresh_upgrades")} - {" "} - {i18n.t("phrases.and_choose_a")} + + Have a look at the available packages in updates-testing repo, by + running dnf --enablerepo=updates-testing list --refresh --upgrades and + choose a package you know. +
  5. - {i18n.t("phrases.Install_the_package")}{" "} - - {i18n.t("phrases.sudo_dnf_enablerepo_updates_testing_update_PACKAGE_NAME")} - - , {i18n.t("phrases.and_test_whether_it_works")} -
    - {i18n.t("words.Note")} {i18n.t("phrases.Other_packages_from")} - {i18n.t("phrases.update_testing")} - {i18n.t("phrases.repo_may_be_installed")}{" "} - - {i18n.t("phrases.somtimes_the_update")}. + + Install the package{" "} + sudo dnf --enablerepo=updates-testing update PACKAGE_NAME, and test + whether it works, as you would expect.
    - {i18n.t("words.Run")}{" "} - {i18n.t("phrases.fedora_easy_karma_fas_username_FAS_USERNAME")}, - {i18n.t("phrases.and_look_for")} {i18n.t("words.Bugs")},{" "} - {i18n.t("phrases.Test_Cases")}, {i18n.t("phrases.and_or")}{" "} - {i18n.t("words.notes")}{" "} - {i18n.t("phrases.sections_in_the_detailed_output")}{" "} - - {i18n.t("phrases.we_already_mentioned_bodhi")}{" "} - {i18n.t("phases.fedora-easy-karma")} - {i18n.t("phrases.interface_for_submitting")} -
    - - {" "} - {i18n.t("phrases.")} {i18n.t("phases.fedora-easy-karma")} - {" "} - {i18n.t("phrases.shows_the_URL")}{" "} - https://bodhi.fedoraproject.org/updates/FEDORA-2019-00870e8bfc. + Note: Other packages from updates-testing repo may be + installed as dependencies (shown during the installation process). Try to test those + too, if possible.{" "} +
    + + + + Sometimes, the update associated with the package you just installed fixes some + specific bugs, or has testcases associated with it.
    - {i18n.t("phrases.you_can_have_a_look")} + Run fedora-easy-karma --fas-username=FAS_USERNAME, and look for{" "} + Bugs, Test Cases, and/or Notes sections in + the detailed output.{" "} +
    + + + We already mentioned Bodhi, several times. Instead of using the{" "} + fedora-easy-karma interface for submitting Karma and/or learning + about the Update, you can visit Bodhi directly. +
    + fedora-easy-karma shows the URL of the relevant update near the + bottom of the text output - look for URL like{" "} + https://bodhi.fedoraproject.org/updates/FEDORA-2019-00870e8bfc. +
    + You can have a look at other people's comments, the afore-mentioned Bugs or Test + Cases, and even submit the Karma directly. Just use your FAS credentials to + log-in. +
  6. - {i18n.t("words.Run")} - {i18n.t("phrases.fedora_easy_karma_fas_username_FAS_USERNAME")}{" "} - {i18n.t("phrases.and_report_what_you_found_out")}{" "} + + Run fedora-easy-karma --fas-username=FAS_USERNAME and report what you + found out.{" "} + - {i18n.t("phrases.it_identifies")} - {i18n.t("phrases.update_testing")}{" "} - {i18n.t("phrases.repository_and_matches")} -
    - {i18n.t("phrases.you_are_then_presented")}{" "} + + It identifies the packages installed from the updates-testing{" "} + repository, and matches them to the updates in Bodhi. +
    + You are then presented with the relevant updates one-by-one, to submit Karma and a + comment.{" "} +
    1. - {i18n.t("words.enter")} - 1 {i18n.t("phrases.to_mark_positive")}+ -1{" "} - {i18n.t("phrases.to_mark_the")}
      - {i18n.t("phrases.not_sure_you_can")}{" "} - - {i18n.t("phrases.Update_Feedback_Guidelines")} - -
      - {i18n.t("phrases.still_not_sure")} - {i18n.t("words.enter")} - {i18n.t("phrases.to_skip_it")} + + Enter 1 to mark positive karma (the update works just fine, as + far as you can tell), or -1 to mark the package as broken.{" "} +
      + Not sure you can judge the package's state? Have a look at the{" "} + + Update Feedback Guidelines + +
      + Still not sure? Just press Enter to skip it. +
    2. - {i18n.t("phrases.add_a_comment")}{" "} - {i18n.t("phrases.i_tried_openning")} - {i18n.t("phrases.when_you_test")}{" "} - {i18n.t("phrases.i_opened_a_couple")}{" "} - {i18n.t("phrases.for_a_web")}. -
      - {i18n.t("phrases.Absolutely_make_sure")} + + Add a comment - even if it works, try to describe what you tested. It can be + as easy as{" "} + I tried openning and editing a document, and it worked. when you + test a text-editor, or{" "} + I opened a couple of tabs, and browsed random pages. for a + web-browser. +
      + Absolutely make sure to provide reasonable amount of detail, when submitting + negative karma - ideally, you should also create a bugreport, and reference + it in the comment. +
  7. - {i18n.t("phrases.Restore_the_stable")}{" "} - {i18n.t("phrases.sudo_dnf_distro_sync")} + + Restore the stable-packages on your system by running{" "} + sudo dnf distro-sync + {" "}
diff --git a/src/wizard/FedoraManualTesting.js b/src/wizard/FedoraManualTesting.js index 473f33a..eeda471 100644 --- a/src/wizard/FedoraManualTesting.js +++ b/src/wizard/FedoraManualTesting.js @@ -1,7 +1,8 @@ import React, { useState } from "react" -import { useSelector } from "react-redux" import { Modal, ModalHeader, ModalBody, ModalFooter } from "reactstrap" import { CollapsableCard, ModalBadge } from "./components" +import { Trans } from "react-i18next" +import { useSelector } from "react-redux" export default (props) => { let sections = Object.keys(props.data).map((k) => ( @@ -36,60 +37,75 @@ export function FedoraManualTestingItemsListSub1(props) { switch (props.title) { case "Installation": l1 = ( -
- {i18n.t("words.the")} {i18n.t("words.Installation")}{" "} - {i18n.t("phrases.Installation_text")} -
- {i18n.t("phrases.Installation_text1")} -
- {i18n.t("words.Note")} {i18n.t("phrases.Installation_text2")} +
+ + The Installation testcases generally deal with a part of the + installation procedure. +
+ You will certainly need an installation ISO, and either a Virtual or Bare-metal machine + to run the test. +
+ Note: some (not that many, though) of these testcases require Bare-metal + machine. Be sure to read the Description of the testcase carefully. +
) break case "Desktop": l1 = ( -
- {i18n.t("words.the")} {i18n.t("words.Desktop")}{" "} - {i18n.t("phrases.Desktop_text")} -
- {i18n.t("phrases.Desktop_text1")} +
+ + The Desktop testcases cover basic functionality of the desktop + environment. +
+ You can either install Fedora onto clean Virtual or Bare-metal machine, or use a Live + image instead. +
) break case "Base": l1 = ( -
- {i18n.t("words.the")} {i18n.t("words.Base")}{" "} - {i18n.t("phrases.base_text")} -
- {i18n.t("phrases.base_text1")} -
- {i18n.t("phrases.Pro_tip")}: {i18n.t("phrases.base_text3")} +
+ + The Base testcases cover the system's basic functionality just + after a clean installation. +
+ Most times, you will be asked to perform a clean Fedora installation. You can use + either Virtual or Bare-metal machine. +
+ Pro tip: using a snapshot of cleanly installed Virtual machine is just fine. No + need to reinstall for every testcase. +
) break case "Server": l1 = ( -
- {i18n.t("words.the")} {i18n.t("words.Server")}{" "} - {i18n.t("phrases.Server_text")} +
+ + The Server testcases usually require multiple machines to test the + server-client behaviour, and might feel a bit advanced. +
) break case "Cloud": l1 = ( -
- {i18n.t("cloud_text")} {i18n.t("words.Cloud")}{" "} - {i18n.t("phrases.cloud_text1")} -
- {i18n.t("phrases.cloud_text2")}{" "} - - {i18n.t("phrases.Cloud_provider_setup")} - {" "} - {i18n.t("phrases.guides_for_more_details")} +
+ + Even thought the Cloud testcases are best done in the specific + environments like EC2 or Openstack, you can also perform them locally using Testcloud. +
+ Have a look at the{" "} + + Cloud provider setup + {" "} + guides for more details. +
) break @@ -98,14 +114,13 @@ export function FedoraManualTestingItemsListSub1(props) { } return ( - + {subsections} ) } export function FedoraManualTestingItem(props) { - const { i18n } = useSelector((state) => state.locale) const extra_data = props.data.extra_data const tc_url = extra_data.testcase_url @@ -113,18 +128,19 @@ export function FedoraManualTestingItem(props) { const matrix_url = extra_data.matrix_url var environment_examples = undefined + const { i18n } = useSelector((state) => state.locale) switch (extra_data.testtype) { case "Installation": environment_examples = ( - x86_64 or ARM + x86_64 {i18n.t("words.or")} ARM ) break case "Base": environment_examples = ( - {i18n.t("words.Workstation")}, {i18n.t("words.Server")},{" "} + {18n.t("words.Workstation")}, {i18n.t("words.Server")},{" "} Xfce {i18n.t("words.or")} {i18n.t("words.Minimal")} ) @@ -132,7 +148,7 @@ export function FedoraManualTestingItem(props) { case "Desktop": environment_examples = ( - {i18n.t("words.Workstation")} {i18n.t("words.or")} KDE + {18n.t("words.Workstation")} {i18n.t("words.or")} KDE ) break @@ -153,49 +169,67 @@ export function FedoraManualTestingItem(props) {
  1. - {i18n.t("phrases.Identify_the_testcase_and_environment_in_our")} - - {i18n.t("phrases.Tescase_matrix")} - {" "} + + Identify the testcase and `environment` in our{" "} + + Tescase matrix{" "} + +
    • - {i18n.t("phrases.ModalBadge")} {environment_examples} {i18n.t("words.for_the")}{" "} - {testtype} {i18n.t("phrases.testcase_but_you_can")}{" "} - {i18n.t("words.Result")} {i18n.t("phrases.Column_which_actually")} + + Have a look at the matrix. The rows are the testcases, and the columns are the + environments. Most of the time, these are {environment_examples} for the{" "} + {testtype} testcases, but you can also encouter a generic Result{" "} + column, which usually means you can use any media/architecture available. +
    • - {i18n.t("phrases.For_this_particular_testcase")}{" "} - {extra_data.envs.join(", ")}{" "} - {extra_data.envs.length > 1 ? "environments are" : "environment is"}{" "} - {i18n.t("phrases.missing_results")} + + For this particular testcase, {extra_data.envs.join(", ")}{" "} + {extra_data.envs.length > 1 ? "environments are" : "environment is"} missing + results. +
  2. - {i18n.t("phrases.Read_the")}{" "} - - {i18n.t("words.Testcase")} - {" "} - {i18n.t("phrases.briefly_just")}{" "} + + Read the{" "} + + Testcase + {" "} + briefly, just to have a general idea of what you will be doing. + {i18n.t("phrases.The_testcases_are_generally_split_into_four_sections")}
    • - {i18n.t("words.Description")} {i18n.t("phrases.Should_give_you")} + + Description should give you a general idea of what is being + tested +
    • - {i18n.t("words.Setup")} {i18n.t("phrases.describes_the_steps")} + + Setup describes the steps to take before you begin working on + the testcase +
    • - {i18n.t("phrases.How_to_test")}{" "} - {i18n.t("phrases.contains_the_individual")} + + How to test contains the individual steps to take in order to + perform the testcase +
    • - {i18n.t("phrases.Expected_results")}{" "} - {i18n.t("phrases.describes_you_to_check")} + + Expected results describe what you should check while testing in + order to decide whether it Passed of Failed +
    @@ -207,7 +241,7 @@ export function FedoraManualTestingItem(props) { target="_blank" rel="noopener noreferrer" href="https://fedoraproject.org/wiki/Test_Results:Current_Installation_Test#How_to_test"> - {i18n.t("words.here")} + here .{" "} @@ -218,17 +252,20 @@ export function FedoraManualTestingItem(props) {
    • - {i18n.t("phrases.Have_a_look")} {environment_examples}{" "} - {i18n.t("words.for_the")} {testtype}{" "} - {i18n.t("phrases.testcases_but_you_can")}{" "} - {i18n.t("words.Result")}{" "} - {i18n.t("phrases.Column_which_usually")} + + Have a look at the matrix. The rows are the testcases, and the columns are + the environments. Most of the time, these are {environment_examples} for + the {testtype} testcases, but you can also encouter a generic{" "} + Result column, which usually means you can use any + media/architecture available. +
    • - {i18n.t("phrases.For_this_particular_testcase")} - {extra_data.envs.join(", ")}{" "} - {extra_data.envs.length > 1 ? "environments are" : "environment is"}{" "} - {i18n.t("phrases.missing_results")} + + For this particular testcase, {extra_data.envs.join(", ")}{" "} + {extra_data.envs.length > 1 ? "environments are" : "environment is"}{" "} + missing results. +
    @@ -238,33 +275,43 @@ export function FedoraManualTestingItem(props) {
  3. - {i18n.t("phrases.Study_the")}{" "} - - {i18n.t("words.Testcase")} - {" "} - {i18n.t("phrases.thoroughly_to_be_sure_you_know_what_to_do")}{" "} - + + Study the{" "} + + Testcase + {" "} + thoroughly, to be sure you know what to do.{" "} + +
    • {i18n.t("phrases.The_testcase_structure_is_not_making_sense")}{" "} - - {i18n.t("phrases.The_testcases_are_generally_split_into_four_sections")} + + {i18n.t("phrases.The_testcases_are_generally_split_into_four_sections:")}
      • - {i18n.t("words.Description")}{" "} - {i18n.t("phrases.should_give_you_a")} + + Description should give you a general idea of what is + being tested +
      • - {i18n.t("words.Setup")}{" "} - {i18n.t("phrases.describes_the_steps")} + + Setup describes the steps to take before you begin working + on the testcase +
      • - {i18n.t("phrases.How_to_test")}{" "} - {i18n.t("phrases.contains_the_individual")} + + How to test contains the individual steps to take in order + to perform the testcase +
      • - {i18n.t("phrases.Expected_results")}{" "} - {i18n.t("phrases.describes_you_to_check")} + + Expected results describe what you should check while + testing in order to decide whether it Passed of Failed +
      @@ -272,11 +319,17 @@ export function FedoraManualTestingItem(props) {
    • {i18n.t("phrases.Maybe_you_are_stuck")}{" "} - {i18n.t("phrases.if_you_are")}{" "} - - {i18n.t("words.web_interface")} - {" "} - {i18n.t("phrases.Just_enter_a_Nickname")} + + If you are not that familiar with IRC, you can use the{" "} + + web-interface + {" "} + just enter a Nickname of your choice, #fedora-qa (including the hash sign) in + the Channels field, and click Connect. +
    @@ -289,27 +342,28 @@ export function FedoraManualTestingItem(props) { expand_class="success" expand_text={i18n.t("phrases.Everything_went_well")} type="btn"> - {i18n.t("phrases.Great_Either_use")}{" "} - {i18n.t("phrases.relval_report_results")}{" "} - {i18n.t("phrases.on_command_line")} {i18n.t("words.relval")} - {i18n.t("phrases.package_first")}{" "} - - {i18n.t("words.matrix")} - {" "} - {i18n.t("phrases.directly_by_clicking_on_the")} {i18n.t("words.Edit")}{" "} - {i18n.t("phrases.link_next_to_the_Matrice_header_and_put")}{" "} - {{{i18n.t("phrases.result_pass_your")}}}{" "} - {i18n.t("phrases.in_the_appropriate_spot")} + + Great! Either use relval report-results on command line (make sure to + install the relval package first), or modify the{" "} + + matrix + {" "} + directly by clicking on the Edit link next to the Matrice's header, and + put {{result|pass|YOUR_NAME_HERE|}} in the + appropriate spot. +
    - {i18n.t("phrases.Awesome_Ideally_read_up_on")}{" "} - https://fedoraproject.org/wiki/How_to_file_a_bug_report -
    - {i18n.t("phrases.if_you_dont_like_like_reading")} + + Awesome! Ideally read up on https://fedoraproject.org/wiki/How_to_file_a_bug_report +
    + If you don't feel like reading a wall of text, at least pot together a small document + containing: +
    • {i18n.t("phrases.brief_description_of_what")}
    • @@ -319,23 +373,28 @@ export function FedoraManualTestingItem(props) {
    • {i18n.t("phrases.note_what_you_did")}
    • {i18n.t("phrases.try_to_reproduce_the")}
    • - {i18n.t("phrases.share_your_notes_on_the")}{" "} - - {i18n.t("phrases.if_you_are_not_familiar")} - + + Share your notes on the internet (you can use fpaste), and ask for help with + filing the bug report on our IRC channel #fedora-qa at freenode.net{" "} + + If you are not that familiar with IRC, you can use the web-interface[link] just + enter a Nickname of your choice, #fedora-qa (including the hash sign) in the + Channels field, and click Connect. + +
    - {i18n.t("phrases.once_you_get_the_bug_reported")}{" "} - {i18n.t("phrases.relval_report_results")}{" "} - {i18n.t("phrases.on_command_line")} {i18n.t("words.relval")}{" "} - {i18n.t("phrases.package_first")}{" "} - - {i18n.t("words.matrix")} - {" "} - {i18n.t("phrases.directly_by_clicking_on_the")} {i18n.t("words.Edit")}{" "} - {i18n.t("phrases.link_next_to_the_Matrice_header_and_put")}{" "} - {{{i18n.t("phrases.result_fail_your")}}}{" "} - {i18n.t("phrases.in_the_appropriate_spot")} + + Once you get the Bug reported, make sure to also submit the result into the testing + matrix. Either use relval report-results on command line (make sure to + install the relval package first), or modify the{" "} + + matrix + {" "} + directly by clicking on the Edit link next to the Matrice's header, and + put {{result|fail|YOUR_NAME_HERE|BUG_NUMBER|}} in + the appropriate spot. +
@@ -356,7 +415,7 @@ function ModalInfo(props) { } const project = props.buttonLabel.split(":")[0] - const ticket = props.buttonLabel.split(":")[1] //strip whitespace? + const ticket = props.buttonLabel.split(":")[1] return (
diff --git a/src/wizard/step/Step4.js b/src/wizard/step/Step4.js index 63c2a5a..7d350c8 100644 --- a/src/wizard/step/Step4.js +++ b/src/wizard/step/Step4.js @@ -4,10 +4,10 @@ import { shallowEqual, useSelector } from "react-redux" import * as R from "ramda" import { useHistory } from "react-router-dom" import Manual from "../Manual" +import { Trans } from "react-i18next" const Step4 = (props) => { const { query } = props - const { i18n } = useSelector((state) => state.locale) const history = useHistory() @@ -89,59 +89,75 @@ const Step4 = (props) => { case "Installation": return (
- {i18n.t("words.the")} {i18n.t("words.Installation")}{" "} - {i18n.t("phrases.Installation_text")} -
- {i18n.t("phrases.Installation_text1")} -
- {i18n.t("words.Note")} {i18n.t("phrases.Installation_text2")} + + The Installation testcases generally deal with a part of the + installation procedure. +
+ You will certainly need an installation ISO, and either a Virtual or Bare-metal + machine to run the test. +
+ Note: some (not that many, though) of these testcases require Bare-metal + machine. Be sure to read the Description of the testcase carefully. +
) case "Desktop": return (
- {i18n.t("words.the")} {i18n.t("words.Desktop")}{" "} - {i18n.t("phrases.Desktop_text")} -
- {i18n.t("phrases.Desktop_text1")} + + The Desktop testcases cover basic functionality of the desktop + environment. +
+ You can either install Fedora onto clean Virtual or Bare-metal machine, or use a Live + image instead. +
) case "Base": return (
- {i18n.t("words.the")} {i18n.t("words.Base")}{" "} - {i18n.t("phrases.base_text")} -
- {i18n.t("phrases.base_text1")} -
- {i18n.t("phrases.Pro_tip")}: {i18n.t("phrases.base_text3")} + + The Base testcases cover the system's basic functionality just + after a clean installation. +
+ Most times, you will be asked to perform a clean Fedora installation. You can use + either Virtual or Bare-metal machine. +
+ Pro tip: using a snapshot of cleanly installed Virtual machine is just fine. + No need to reinstall for every testcase. +
) case "Server": return (
- {i18n.t("words.the")} {i18n.t("words.Server")}{" "} - {i18n.t("phrases.Server_text")} + + The Server testcases usually require multiple machines to test the + server-client behaviour, and might feel a bit advanced. +
) case "Cloud": return (
- {i18n.t("cloud_text")} {i18n.t("words.Cloud")}{" "} - {i18n.t("phrases.cloud_text1")} -
- {i18n.t("phrases.cloud_text2")}{" "} - - {i18n.t("phrases.Cloud_provider_setup")} - {" "} - {i18n.t("phrases.guides_for_more_details")} + + Even thought the Cloud testcases are best done in the specific + environments like EC2 or Openstack, you can also perform them locally using + Testcloud. +
+ Have a look at the{" "} + + Cloud provider setup + {" "} + guides for more details. +
) From 0fff86ce6f157dd87aeccdb2473c5928fa326d0f Mon Sep 17 00:00:00 2001 From: manisha Date: Aug 10 2021 11:22:42 +0000 Subject: [PATCH 5/11] implemented react-i18next --- diff --git a/.gitignore b/.gitignore index 5504588..e580f24 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. +# https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules diff --git a/public/index.html b/public/index.html index 016a790..6fe2ed2 100644 --- a/public/index.html +++ b/public/index.html @@ -1,15 +1,15 @@ - - - - + + + + - + - - + - +
Proposed Blockers{i18n.t("phrases.Proposed_Blockers")} {stats.blockers_proposed}
Accepted Blockers{i18n.t("phrases.Accepted_Blockers")} {stats.blockers}
Proposed FEs{i18n.t("phrases.Proposed_FEs")} {stats.fe_proposed}
Accepted FEs{i18n.t("phrases.Accepted_FEs")} {stats.fe}