kleros / linguo Goto Github PK
View Code? Open in Web Editor NEWLinguo user interface.
Linguo user interface.
Steps that caused the issue:
1- I created a translation request from english to portuguese.
2- Navigated to "Work as a translator" (https://linguo-beta.netlify.app/translator?filter=inReview&secondLevelFilter=toReview)
3- Crash.
At this point opening a new tab and navigating to https://linguo-beta.netlify.app/translator?filter=inReview&secondLevelFilter=toReview crashes.
Create Evidence Display Interface specific for Linguo.
Whenever a translation gets approved and the payment is sent, although in the UI the notification is shown, the email notification is not sent.
I don't know if this problem is extensive to the other notifications.
I've checked this issue with another translator and he is experiencing the same issue.
Currently, the TaskPage query has a hardcoded number of tasks set to 300.
To improve the user experience, pagination needs to be implemented at the TaskListFetcher component level.
Link to relevant docs: https://docs.3box.io/api/messaging.
Currently it is a bit confusing to users to understand that they need a certain level in at least 2 different languages to be able to see tasks as a translator.
I submitted evidence before and the _evidence
field of the Evidence event was linguo-evidence-ikSDT7RQuo.json
instead of just evidence.json
All other Kleros dapps are currently using evidence.json
, so for consistency + gas savings, the filename should just stay as evidence.json
, unless there's a reason I haven't caught up yet.
For Linguo
we need to define:
reviewTimeout
translatorMultiplier
(assignment)challengerMultiplier
(challenge)sharedStakeMultiplier
(dispute)winnerStakeMultiplier
(dispute)loserStakeMultiplier
(dispute)Seems like it is due to the fact that Windows uses a different MIME type for zip files.
Updating whitelist for zip:
"application/x-zip",
"application/x-zip-compressed",
"multipart/x-zip"
...
Resolved
For the cryptoeconomic models created by @whwgeorge to work properly as the smart contract is implemented today, it's important that tasks can't vary too much in difficulty, so we will set a hard limit for the amount of words in a translation task.
@kleros is improving the way we onboard users.
Instead of simply throwing a Metamask popup on the user's face as soon as (s)he visits our dapps, we will eventually move to an opt-in approach: the users will be asked for a wallet only when needed. Furthermore, the (s)he will also be able to choose a wallet provider.
Right now, beyond Metamask, we are trying to add support to Fortmatic.
To make things easier, we decided use web3-react
, because of its concept of connectors, which allow for easily switching different wallet providers, and the fact that it already has built-in connectorn for both Metamask (what they call InjectedConnector) and Fortmatic.
As this project is setup today, @web3-react/fortmatic-connector
is broken. It fails to properly import the fortmatic
module which it depends upon.
The issue seems to happen here:
const { default: Fortmatic } = await import('fortmatic')
What they expect is the fortmatic
package to export an ES module, but I checked the tarball of [email protected]
and it exposes only a CJS module.
Apparently, when dynamic importing a CJS module with the current Linguo setup ([email protected]
+ [email protected]
), instead of wrapping it into an ES module that would look like export default module.exports
, it simply imports the CJS module as is.
The solution for the FortmaticConnector
was not to use the provided @web3-react/fortmatic-connector
, instead, roll my own. In fact, it's basically a CTRL+C/CTRL+V of the original package code, the only difference was the way the import to fortmatic
is made.
// ...
-const { default: Fortmatic } = await import('fortmatic');
+const Fortmatic = await import('fortmatic');
// ...
Actually, to support both cases, I have:
let Fortmatic = await import('fortmatic');
Fortmatic = Fortmatic.default || Fortmatic;
Clone this repo: git clone https://github.com/kleros/linguo.git
Install dependencies: yarn install
Go to connectors.js
file.
Change the import of FortmaticConnector
:
@@ -1,5 +1,5 @@
import { InjectedConnector } from '@web3-react/injected-connector';
import { NetworkConnector } from '@web3-react/network-connector';
-import { FortmaticConnector } from '~/adapters/web3-react/FortmaticConnector';
+import { FortmaticConnector } from '@web3-react/fortmatic-connector';
Run the development server: yarn start
;
Go to http://localhost:1234
Look for the "gear" button to access the app settings, then click in "connect to wallet":
You will probably see the following error in the console:
TypeError: "Fortmatic is not a constructor"
_temp4 index.ts:34
web3React.js:17:12
getErrorMessage web3React.js:17
WalletConnectionModal WalletConnectionModal.jsx:87
React 8
unstable_runWithPriority scheduler.development.js:653
React 5
createHandleActivation WalletConnectionModal.jsx:56
IMPORTANT: I can't reproduce the problem outside the Linguo repo:
This seems like a problem of CJS/ES modules interoperability. I can think of some reasons:
parcel
dynamic module importing.
.browserslistrc
..babelrc
, which is causing the code to not be properly transpiled.babel
itself.parcel
cache and start the dev server again. The results were the same.Things I observed in the Linguo repo:
node_modules
works as expected.node_modules
works as as described here: the CJS module is not wrapped into an ES module; the promise returned by import()
is resolved with the value of module.exports
.
We could use a different color on the title: (Final Decision...) as well as the 1px outline box.
in case itβs a positive decision we could use #00C42B; in case of a rejection we could use #F60C36
In the requester flow, the webpage doesn't refresh or lead back to the Requester Dashboard
after submitting a new task.
We should display the aprox. value in USD for any currency-related values in Linguo.
As @whwgeorge pointed out on Slack:
Regardless, in the box on the Review Translations page, where it says "During review you can challenge the translation if you think it does not fulfill the quality requirements. To do so, you need to send a challenge deposit. If the jurors decide to not approve the translation you receive your challenge deposit back + the deposit of the translator (minus arbitration fees). If the translation is approved by the jurors your challenge deposit goes to the translator.", it would probably be helpful to give potential challengers more information about how much they can win if successful.
It does allow to open tasks. Error message appears "Failed after many retries"
When creating a translation request, the user must set a deadline for the translation.
The Linguo smart contract enforces that the deadline must be in the future, otherwise a translator wouldn't have the opportunity to work on it.
Currently we are using Ant Design DatePicker
component for that:
//...
function isTodayOrBefore(current) {
return current && dayjs(current) < dayjs().endOf('day');
}
// ...
<DatePicker
size="large"
placeholder="Deadline"
disabledDate={isTodayOrBefore}
showToday={false}
showTime={{
defaultValue: dayjs('00:00:00', 'HH:mm:ss'),
showNow: false,
use12Hours: false,
}}
format="DD MMMM YYYY HH:mm:ss [(Local time)]"
/>
This will enforce that the deadline will be at least the beginning of next day.
Currently the component is rendered like this:
Notice that while the day that represents the current date in the calendar (circled in red) is disabled, however, the Now
button is enabled and if clicked will populate the input, even though the current date falls into the range of disabledDate
.
This is related to ant-design
issue #21159.
Currently I added a custom validation rule to the respective Form.Item
, enforcing that if the user selects an invalid date, (s)he won't be able to submit the form.
Linguo still using Sokol as Gnosis Chain testnet, however the offical post-merge testnet is Chiado.
Linguo contracts need to be deployed on Chiado and all references to Sokol must be relpaced in the dapp.
After unlocking permanently PNK, I am unable to request the payment:
My address with KPNK: 0xdC8C1a8CB38F27C188a43CE0eBBC8e42e393D0d3
I went ahead and created it with ETH without problems: https://linguo-beta.netlify.app/translation/0x0825f16598AcB518851f8959b8267EF296c57f81/30
Create a Twitter bot to provide a livestream of events happening on Linguo.
It shows a deadline, which is the last time someone can take a task, but it does not show how much time the translator will have to complete the task.
Affected code:
Line 47 in 92f7d6f
Update the environment variable on Netlify
Resolves kleros/builder-baseline#22
Some mapped potential questions users might have:
Linguo
contracts on mainnet for each supported pair of languages.It's annoying users and inspire distrust.
Internal server error.
https://linguo.kleros.io/translation/0xa3E4348BDDc32AfcedC5e088e0E21FD6154A0180/2
The user mistakenly uploaded the original text file as the translation file. We can prevent this by comparing ipfs hashes of the original text and translated text and warn the user if matches.
Guys, since Linguo is not being maintained in a while, it seems like a couple of thinks have broken.
The most important thing is that after being acquired by Gnosis, xDAI Chain was rebranded into Gnosis Chain. The old endpoints worked for a while, but they have been disabled.
Someone with access to the Netlify account making the Linguo builds need to update the JSON_RPC_URLS
variable with the information from this page.
Please not that JSON_RPC_URLS
is a JSON-stringified version of something like this:
{
1: 'https://mainnet.infura.io/v3/<INFURA_KEY>',
100: 'https://rpc.xdaichain.com/',
// ...
}
Just replace the https://rpc.xdaichain.com/
with https://rpc.gnosischain.com/
and the issue of tasks not being loaded by default will be fixed.
Using the >> Go to the Arbitrable Application
from Court the Linguo interface fails to load the translation with the error in the console:
src.7607e5c4.js:1 Uncaught (in promise) Error: Linguo API not properly initialized
I tested on multiple browsers and with accounts that have done Linguo onboarding and those that haven't and it errors with all.
As suggested by @fnanni-0 here:
I think it would be great if the challenger could submit a translation with the corrections and claim the task price too. If the challenger wins, not only the translator is punished and the challenger is rewarded, but the requester gets the translation he requested instead of losing time and money.
This could improve requester's UX and potentially increase the payout of challengers.
Currently challengers can profit by finding a single issue with the translation which would make it non-compliant with the required quality tier. One can optimize this task by scanning for common sources of mistakes, for example.
With this change, if the challenger decides to put some additional effort into the task to provide a fully compliant translation, beyond getting the requester deposit, he would also be rewarded with the escrow payment from the requester.
The requester benefits because she would get the translation done. Currently she gets refunded of her initial escrow deposit, but will spend both money with gas and time waiting for the task. If she has a deadline, this might be a deal-breaker.
Some challenges remain on how to actually implement this:
This would be interesting for users watching price go up every second.
This issue is related to integrating a subgraph and refactoring the API data layer
This is not a well-known unit, thus confusing. Let's go with 0.001 xDai instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.