Opened 8 months ago

Last modified 6 months ago

#217 accepted defect

Record validator username when importing

Reported by: jenia Owned by: sushkov
Priority: normal Milestone: 1.0
Component: general Version: 0.1
Keywords: has-patch needs-testing 2nd-opinion Cc: sushkov, forumi@…

Description

Currently, when a user with validator rights imports strings, they are recorded in a GlotPress translation project without a username attached. GlotPress should record who added the string (whether it was by import, or else) and ideally also display if the string was imported or added via GlotPress itself.

Attachments (1)

gp_save_import_user.patch (1.6 KB) - added by dimadin 7 months ago.

Download all attachments as: .zip

Change History (7)

  • Cc sushkov added
  • Component changed from interface to general
  • Milestone set to 1.0
  • Version set to 0.1
  • Cc forumi@… added
  • Keywords has-patch needs-testing added

Attached patch will add validator to each translation that is imported. Storing method that is used for submission of translation is currently not possible due to lack of table fields (see #227) and I don't see any value in doing so.

comment:3 follow-up: ↓ 4   sushkov6 months ago

  • Keywords 2nd-opinion added

A did a short review and was not sure we need the new set_user_id method, since changing $entry['user_id'] should have the same results.

Also, could you add a test for this patch?

Thanks.

comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5   dimadin6 months ago

Replying to sushkov:

A did a short review and was not sure we need the new set_user_id method, since changing $entry['user_id'] should have the same results.

True, but I thought that it might get used later as a standalone.

Also, could you add a test for this patch?

Unfortunately no, I (still) don't work with unit tests.

comment:5 in reply to: ↑ 4   sushkov6 months ago

  • Owner set to sushkov
  • Status changed from new to assigned

Replying to dimadin:

Replying to sushkov:

A did a short review and was not sure we need the new set_user_id method, since changing $entry['user_id'] should have the same results.

True, but I thought that it might get used later as a standalone.

Ideally, we should not touch code that's not relevant to this ticket. Hope you are ok with this :)

Also, could you add a test for this patch?

Unfortunately no, I (still) don't work with unit tests.

I'll take a look later at the patch and write a test case. After what we get this committed.

Thanks for the patch!

  • Status changed from assigned to accepted
Note: See TracTickets for help on using tickets.