andrewhancox / moodle-atto_translations

1 stars 4 forks source link

New feature: Add option to regenerate hash #9

Closed rjnl closed 12 months ago

rjnl commented 1 year ago

When a content with existing hash is copied over via backup/restore, import or duplicate activity, the hash is also duplicated. Currently, we have to manually remove the existing hash, then save, then edit the content again to generate new hashes. Its pretty tedious but having duplicate hashes has even more damaging effects on content translations. Also see https://github.com/andrewhancox/moodle-filter_translations/issues/87

A nice feature to have would be to have a "Generate new hash" button in Atto, so that users can easily generate a new hash when needed.

andrewhancox commented 1 year ago

I’m pretty sure local plugins can hook into the backup process and apply filters which may be a better option?

Sent from my iPhone

On 26 Oct 2022, at 05:01, Rajneel Totaram @.***> wrote:

 When a content with existing hash is copied over via backup/restore, import or duplicate activity, the hash is also duplicated. Currently, we have to manually remove the existing hash, then save, then edit the content again to generate new hashes. Its pretty tedious but having duplicate hashes has even more damaging effects on content translations. Also see andrewhancox/moodle-filter_translations#87

A nice feature to have would be to have a "Generate new hash" button in Atto, so that users can easily generate a new hash when needed.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

rjnl commented 1 year ago

There will be use cases where one would want to retain the duplicate hash, so that the copies of content rely on the same translation, eg: generic content that will not change. And then there's the use case when a new activity is duplicated/imported and then most of its content gets updated.

So hooking up into the backup process may not be able to handle both use cases. I'm not too sure about that.

jgramp commented 1 year ago

I would think usually you wouldn't want it linked. Often I would say with HTML content, not plain text fields you would want to break the link..how does the plugin handle encountering multiple translation spans in one html text area? Do we just take the first or last (wherever the latest span is added) and ignore the rest?

Jessica Gramp Moodle Community Manager (UTC+10:30)

On Mon, 31 Oct 2022, 11:01 Rajneel Totaram, @.***> wrote:

There will be use cases where one would want to retain the duplicate hash, so that the copies of content rely on the same translation, eg: generic content that will not change. And then there's the use case when a new activity is duplicated/imported and then most of its content gets updated.

So hooking up into the backup process may not be able to handle both use cases. I'm not too sure about that.

— Reply to this email directly, view it on GitHub https://github.com/andrewhancox/moodle-atto_translations/issues/9#issuecomment-1296399097, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBNVTVWGGQFPU4FWG2S3ZTWF4HPLANCNFSM6AAAAAAROSIILE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

andrewhancox commented 1 year ago

I would assume that you would want it linked initially but may want to break the link at some point in the future...

On 31 Oct 2022, at 01:39, Jessica Gramp @.***> wrote:

I would think usually you wouldn't want it linked. Often I would say with HTML content, not plain text fields you would want to break the link..how does the plugin handle encountering multiple translation spans in one html text area? Do we just take the first or last (wherever the latest span is added) and ignore the rest?

Jessica Gramp Moodle Community Manager (UTC+10:30)

On Mon, 31 Oct 2022, 11:01 Rajneel Totaram, @.***> wrote:

There will be use cases where one would want to retain the duplicate hash, so that the copies of content rely on the same translation, eg: generic content that will not change. And then there's the use case when a new activity is duplicated/imported and then most of its content gets updated.

So hooking up into the backup process may not be able to handle both use cases. I'm not too sure about that.

— Reply to this email directly, view it on GitHub https://github.com/andrewhancox/moodle-atto_translations/issues/9#issuecomment-1296399097, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBNVTVWGGQFPU4FWG2S3ZTWF4HPLANCNFSM6AAAAAAROSIILE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/andrewhancox/moodle-atto_translations/issues/9#issuecomment-1296432604, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJEYMVH5V4P4ZE7XQB6QLLWF4PNZANCNFSM6AAAAAAROSIILE. You are receiving this because you commented.

jgramp commented 1 year ago

Not really. Unless I'm misunderstanding how it works.

If there are multiple translation spans within one html text area does each represent a separate translatable area?

If not, which span takes precedence for the entire text?

We often copy and paste text from one course to another and then heavily change it. So retaining the link would be problematic more times than not in our situation.

We also use a template course and restore it to create new courses in Moodle Academy. We need to check what happens in this case too. We don't want multiple courses linked that contain different source content.

Jessica Gramp Moodle Community Manager (UTC+10:30)

On Mon, 31 Oct 2022, 19:07 Andrew Hancox, @.***> wrote:

I would assume that you would want it linked initially but may want to break the link at some point in the future...

On 31 Oct 2022, at 01:39, Jessica Gramp @.***> wrote:

I would think usually you wouldn't want it linked. Often I would say with HTML content, not plain text fields you would want to break the link..how does the plugin handle encountering multiple translation spans in one html text area? Do we just take the first or last (wherever the latest span is added) and ignore the rest?

Jessica Gramp Moodle Community Manager (UTC+10:30)

On Mon, 31 Oct 2022, 11:01 Rajneel Totaram, @.***> wrote:

There will be use cases where one would want to retain the duplicate hash, so that the copies of content rely on the same translation, eg: generic content that will not change. And then there's the use case when a new activity is duplicated/imported and then most of its content gets updated.

So hooking up into the backup process may not be able to handle both use cases. I'm not too sure about that.

— Reply to this email directly, view it on GitHub < https://github.com/andrewhancox/moodle-atto_translations/issues/9#issuecomment-1296399097 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACBNVTVWGGQFPU4FWG2S3ZTWF4HPLANCNFSM6AAAAAAROSIILE

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/andrewhancox/moodle-atto_translations/issues/9#issuecomment-1296432604>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAJEYMVH5V4P4ZE7XQB6QLLWF4PNZANCNFSM6AAAAAAROSIILE . You are receiving this because you commented.

— Reply to this email directly, view it on GitHub https://github.com/andrewhancox/moodle-atto_translations/issues/9#issuecomment-1296765874, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBNVTR6HE66VTVR7Y6EJLLWF6AMTANCNFSM6AAAAAAROSIILE . You are receiving this because you commented.Message ID: @.***>