mozilla / mozilla/pontoon

Create API to extract information from uploaded file (terminology matches, other data)

Open
#4,534 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API days P3
Dominant language
Python
Stars
1.7k
Forks
611
Avg merge
1d 19h
Merged PRs (30d)
49

Description

We can leverage the approach we're using to upload translated files for api/v2/upload, parse them and extract terminology matches in the backend.

Entrypoint: api/v2/terminology/extract-from-file. Requires PAT to avoid abuse, but can probably use a higher threshold than upload (e.g. doesn't require recalculating stats, it's just reading data).

Accept a locale and uploadfile parameters. Returns a list of matching terms similar to the other api.

Based on Slack conversation, it might make sense to implement this as part of a larger API that provides information on the file, e.g. warnings/errors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing api/v2/upload implementation and the other terminology API that returns matching terms. Trace how uploaded files are parsed, then verify the PAT requirement and the locale and uploadfile parameters. Done means the new entrypoint returns matching terms and leaves room for the mentioned file warnings or errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
api, backend, localization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.