Web based family history software

Question 'Reference number'

  • Franz Frese
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 year 7 months ago #1 by Franz Frese
'Reference number' was created by Franz Frese
Can you make the Translation of 'Reference number' depending on context?
The contexts are INDI, NOTE, OBJE, REPO, SOUR, FAM.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #2 by mp
Replied by mp on topic 'Reference number'
Why?

Martin - ffp.bauschaffen.de

Please Log in or Create an account to join the conversation.

  • Franz Frese
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 year 7 months ago #3 by Franz Frese
Replied by Franz Frese on topic 'Reference number'
sry, for to make a custom translation of one of the contexts.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #4 by Peter_S
Replied by Peter_S on topic 'Reference number'
I also see no need for this. In all cases, it is only a reference number for different purposes of the user to identify a record.
The context can be specified closer by the TYPE tag.

Peter

webtrees 2.1.22, vesta modules, chart modules of magicsunday, extended family and imprint of hartenthaler
PHP 8.3.12, MariaDB 10.11.8
Webhosting: genonline.de

Please Log in or Create an account to join the conversation.

  • Franz Frese
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 year 7 months ago #5 by Franz Frese
Replied by Franz Frese on topic 'Reference number'
I see the need for me and I would use it for me. It is called reference number but it can contain an arbitrary text. The TYPE (and its translations) is not shown everywhere, where the text 'reference number' is shown.

Please Log in or Create an account to join the conversation.

  • norwegian_sardines
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 7 months ago #6 by norwegian_sardines
Replied by norwegian_sardines on topic 'Reference number'

I see the need for me and I would use it for me. It is called reference number but it can contain an arbitrary text. The TYPE (and its translations) is not shown everywhere, where the text 'reference number' is shown.
Please provide an example of your need and how it apply to your situation.

What part of the Reference number needs translating? I use the value in several places in my database. The number is “just a number”, similar to a book SBN, Library of Congress number, or other catalogue number. The Reference Number may contain letters, but nothing that can or could be translated.

I set the REFN.TYPE value to indicate what the reference is used for, such as ‘Accession Number’, or the name of a foreign reference organization.

+1 REFN <USER_REFERENCE_NUMBER>
+2 TYPE <USER_REFERENCE_TYPE>

Ken

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago - 1 year 7 months ago #7 by joeysun
Replied by joeysun on topic 'Reference number'
I have been using Franz's custom translation module to relabel INDI:REFN from Reference number to Reference data. I would rather have INDI:REFN be relabeled to Generational number as a 'bastardized' Ahnentafel numbering system but then the Generational number label replaces (using Franz's module) all the INDI:REFN, NOTE:REFN, OBJE:REFN, REPO:REFN, SOUR:REFN, FAM:REFN labels from Reference number to Generational number.

Why?
I help a group of webtrees newbies and I try to tailor their sites to reflect some of the commonalities of recording our group/club's genealogical interest and needs. As an example, using again Franz's module, I can change the label of INDI:NATI tag from Nationality to Ancestral Clan. It makes the program more relevant to the newbs.

Doug
webtrees v2.1.20 at Our Family Tree (Jiapu 家譜/家谱)
PHP Version v8.1.x, LiteSpeed V8.1, MariaDB 15.1 | protected/'hindered' by ModSecurity
Last edit: 1 year 7 months ago by joeysun. Reason: clarity & grammar

Please Log in or Create an account to join the conversation.

  • norwegian_sardines
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 7 months ago - 1 year 7 months ago #8 by norwegian_sardines
Replied by norwegian_sardines on topic 'Reference number'
Joeysun/Doug:

Are you asking for the title ‘Reference Number’ to be changed to some other title, rather than the actual value of the number to be translated?

I use the REFN.TYPE to indicated what the reference number means. For example:

An accession number
1 REFN 2021.0112.0001
2 TYPE accession

Reference number used in a book for an individual (could be a foreign book SOSA, or d'Aboville System generation number)
1 REFN SFB-251
2 TYPE Smith Family Book

Ken
Last edit: 1 year 7 months ago by norwegian_sardines.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #9 by joeysun
Replied by joeysun on topic 'Reference number'

Joeysun/Doug: Are you asking for the title ‘Reference Number’ to be changed to some other title, rather than the actual value of the number to be translated?
Yes. but only for INDI:REFN. I thought I have seen Forum Posts which people have custom modules to change the title/label, but for the life of me I cannot find those posts. That is how I enlisted the help of Franz.

Doug
webtrees v2.1.20 at Our Family Tree (Jiapu 家譜/家谱)
PHP Version v8.1.x, LiteSpeed V8.1, MariaDB 15.1 | protected/'hindered' by ModSecurity

Please Log in or Create an account to join the conversation.

  • norwegian_sardines
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 7 months ago - 1 year 7 months ago #10 by norwegian_sardines
Replied by norwegian_sardines on topic 'Reference number'
Doug,

Sorry, I can’t help with the translation of the Title/Label. If it is not now translated, then I would write up a “bug” or feature request for it so that your data entry people know what they should be adding. With some detail of the request!

The unfortunate thing for me (and potentially others) would be that the title/label could have multiple uses for an individual based on meaning. For example: what book I found that individual (the foreign book’s generation number) or the accession number all individuals and families receive when they get added to the database.

Ken
Last edit: 1 year 7 months ago by norwegian_sardines.

Please Log in or Create an account to join the conversation.

  • norwegian_sardines
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 7 months ago - 1 year 7 months ago #11 by norwegian_sardines
Replied by norwegian_sardines on topic 'Reference number'
After reading Doug’s use case, I better understand what I think Franz is asking for, and I agree that for data entry, some form of ‘record type’ based context would/could be helpful!

Ken
Last edit: 1 year 7 months ago by norwegian_sardines.

Please Log in or Create an account to join the conversation.

  • Franz Frese
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 year 7 months ago #12 by Franz Frese
Replied by Franz Frese on topic 'Reference number'

I see the need for me and I would use it for me. It is called reference number but it can contain an arbitrary text. The TYPE (and its translations) is not shown everywhere, where the text 'reference number' is shown.
Please provide an example of your need and how it apply to your situation.

What part of the Reference number needs translating? I use the value in several places in my database. The number is “just a number”, similar to a book SBN, Library of Congress number, or other catalogue number. The Reference Number may contain letters, but nothing that can or could be translated.

I set the REFN.TYPE value to indicate what the reference is used for, such as ‘Accession Number’, or the name of a foreign reference organization.

+1 REFN <USER_REFERENCE_NUMBER>
+2 TYPE <USER_REFERENCE_TYPE>

So for your last example, you can do a user-translation for 'Reference number' with 'Organization'. What is your problem. You can handle verything as you did before, for others it gives more flexibility. The code in the app is a simple 1:1 replace. In the translation file you need some extra lines for the context but without new translations (you can in all cases use the same as now for Reference number).

Please Log in or Create an account to join the conversation.

  • norwegian_sardines
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 7 months ago #13 by norwegian_sardines
Replied by norwegian_sardines on topic 'Reference number'

Franz Said:

So for your last example, you can do a user-translation for 'Reference number' with 'Organization'. What is your problem. You can handle verything as you did before, for others it gives more flexibility. The code in the app is a simple 1:1 replace. In the translation file you need some extra lines for the context but without new translations (you can in all cases use the same as now for Reference number).

Im not sure what you are saying! Did you read Doug and my interaction in this thread?

Ken

Please Log in or Create an account to join the conversation.

  • Franz Frese
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 year 7 months ago #14 by Franz Frese
Replied by Franz Frese on topic 'Reference number'

Franz Said:

So for your last example, you can do a user-translation for 'Reference number' with 'Organization'. What is your problem. You can handle verything as you did before, for others it gives more flexibility. The code in the app is a simple 1:1 replace. In the translation file you need some extra lines for the context but without new translations (you can in all cases use the same as now for Reference number).

Im not sure what you are saying! Did you read Doug and my interaction in this thread?
yes, which part of your interaction do you mean?
Your usage of the tags will be unchanged with my proposed changes.
I do not want to change
+1 REFN <USER_REFERENCE_NUMBER>
+2 TYPE <USER_REFERENCE_TYPE>

I want the presentation of the tag changed in the way, that there is the possibility of a custom translation of the text 'Refenrence number', but only for the INDI.
You can understand?

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #15 by fisharebest
Replied by fisharebest on topic 'Reference number'
> I want the presentation of the tag changed in the way, that there is the possibility of a custom translation of the text 'Refenrence number', but only for the INDI.

This is simple to do with a module.

Create an empty module from one of the examples.

Add this "boot" function
Code:
public function boot(): void { Registry::elementFactory()->registerTags([ 'INDI:REFN' => new UserReferenceNumber(I18N::translate('Your text goes here')), ]); }

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • norwegian_sardines
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 7 months ago - 1 year 7 months ago #16 by norwegian_sardines
Replied by norwegian_sardines on topic 'Reference number'

Franz asked:

I want the presentation of the tag changed in the way, that there is the possibility of a custom translation of the text 'Refenrence number', but only for the INDI.
You can understand?

What I think you want based on my interaction with Doug is “the title/label for the REFN tag to be record-type context sensitive”. And I agreed that the label could be different for each of the record-types (i.e. Individual Records, Family Records, Source Records, etc.)

I personally have no issue with the label ‘Reference Number’ in all places because that is what it is, the subtag REFN.TYPE is used in my scenario to identify what one of an infinite number of Reference Numbers the value represents. (i. e. An Accession number, a generation number from one of a hundred other books/genealogies)

So now that I understand Doug’s use case, just write up exactly what you want.

Ken
Last edit: 1 year 7 months ago by norwegian_sardines.

Please Log in or Create an account to join the conversation.

  • Franz Frese
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
1 year 7 months ago - 1 year 7 months ago #17 by Franz Frese
Replied by Franz Frese on topic 'Reference number'
[strike]I entered in the boot() of my translation module --> error message
Error: Class "TranslationNamespace\UserReferenceNumber" not found in .../modules_v4/TranslationModule/TranslationModule.php:51[/strike]
sorry (I am not used in php (without dev env))

Now it is working. Thx Greg for your Tutoring!
Last edit: 1 year 7 months ago by Franz Frese.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #18 by joeysun
Replied by joeysun on topic 'Reference number' [solved]
Thank you Franz, Greg, and Ken. This problem is solved

Doug
webtrees v2.1.20 at Our Family Tree (Jiapu 家譜/家谱)
PHP Version v8.1.x, LiteSpeed V8.1, MariaDB 15.1 | protected/'hindered' by ModSecurity

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum