Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(i18n): itemlist withname locale #1552

Merged
merged 2 commits into from
Apr 6, 2020
Merged

feature(i18n): itemlist withname locale #1552

merged 2 commits into from
Apr 6, 2020

Conversation

leagris
Copy link
Contributor

@leagris leagris commented Dec 25, 2019

Automatically generate entries in Gregtech.lang for items with custom names (mostly used for recipes display in NEI).

Additional entries generated:

    S:gt.metaitem.01.32707.with.CopyOfTheOrb.name=Copy of the Orb
    S:gt.metaitem.01.32707.with.OrbToCopy.name=Orb to copy
    S:gt.metaitem.01.32707.with.OrbToOverwrite.name=Orb to overwrite
    S:gt.metaitem.01.32708.with.AnalyzedProspectionData.name=Analyzed Prospection Data
    S:gt.metaitem.01.32708.with.CopyOfTheStick.name=Copy of the Stick
    S:gt.metaitem.01.32708.with.RawProspectionData.name=Raw Prospection Data
    S:gt.metaitem.01.32708.with.ReadsResearchResult.name=Reads Research result
    S:gt.metaitem.01.32708.with.ScannedBookData.name=Scanned Book Data
    S:gt.metaitem.01.32708.with.ScannedMapData.name=Scanned Map Data
    S:gt.metaitem.01.32708.with.StickToCopy.name=Stick to copy
    S:gt.metaitem.01.32708.with.StickToOverwrite.name=Stick to overwrite
    S:gt.metaitem.01.32708.with.StickToSaveItTo.name=Stick to save it to
    S:gt.metaitem.01.32708.with.WithPunchCardData.name=With Punch Card Data
    S:gt.metaitem.01.32708.with.WithScannedBookData.name=With Scanned Book Data
    S:gt.metaitem.01.32708.with.WithScannedMapData.name=With Scanned Map Data
    S:gt.metaitem.01.32708.with.WritesResearchResult.name=Writes Research result
    S:ic2.crop.invalid.with.DuplicatedSeedsChanceEqualsEfficiency.name=Duplicated seeds; Chance equals efficiency
    S:ic2.crop.invalid.with.InstanceSeedsToDuplicateDoesNotGetConsumedInProgress.name=Instance seeds to duplicate(does not get consumed in progress)
    S:ic2.crop.invalid.with.ScannedSeeds.name=Scanned Seeds
    S:item.for.beeDroneGE.with.ScannedDrone.name=Scanned Drone
    S:item.for.beeLarvaeGE.with.ScannedLarvae.name=Scanned Larvae
    S:item.for.beePrincessGE.with.ScannedPrincess.name=Scanned Princess
    S:item.for.beeQueenGE.with.ScannedQueen.name=Scanned Queen
    S:item.for.butterflyGE.with.ScannedButterfly.name=Scanned Butterfly
    S:item.for.caterpillarGE.with.ScannedCaterpillar.name=Scanned Caterpillar
    S:item.for.pollenFertile.with.ScannedPollen.name=Scanned Pollen
    S:item.for.sapling.with.ScannedSapling.name=Scanned Sapling
    S:item.for.serumGE.with.ScannedSerum.name=Scanned Serum

Automatically generate entries in `Gregtech.lang` for items with custom names (mostly used for recipes display in NEI).

Additional entries generated:

```yaml
    S:gt.metaitem.01.32707.with.CopyOfTheOrb.name=Copy of the Orb
    S:gt.metaitem.01.32707.with.OrbToCopy.name=Orb to copy
    S:gt.metaitem.01.32707.with.OrbToOverwrite.name=Orb to overwrite
    S:gt.metaitem.01.32707.with.copyOfTheOrb.name=Copy of the Orb
    S:gt.metaitem.01.32707.with.orbToCopy.name=Orb to copy
    S:gt.metaitem.01.32707.with.orbToOverwrite.name=Orb to overwrite
    S:gt.metaitem.01.32708.with.AnalyzedProspectionData.name=Analyzed Prospection Data
    S:gt.metaitem.01.32708.with.CopyOfTheStick.name=Copy of the Stick
    S:gt.metaitem.01.32708.with.RawProspectionData.name=Raw Prospection Data
    S:gt.metaitem.01.32708.with.ReadsResearchResult.name=Reads Research result
    S:gt.metaitem.01.32708.with.ScannedBookData.name=Scanned Book Data
    S:gt.metaitem.01.32708.with.ScannedMapData.name=Scanned Map Data
    S:gt.metaitem.01.32708.with.StickToCopy.name=Stick to copy
    S:gt.metaitem.01.32708.with.StickToOverwrite.name=Stick to overwrite
    S:gt.metaitem.01.32708.with.StickToSaveItTo.name=Stick to save it to
    S:gt.metaitem.01.32708.with.WithPunchCardData.name=With Punch Card Data
    S:gt.metaitem.01.32708.with.WithScannedBookData.name=With Scanned Book Data
    S:gt.metaitem.01.32708.with.WithScannedMapData.name=With Scanned Map Data
    S:gt.metaitem.01.32708.with.WritesResearchResult.name=Writes Research result
    S:gt.metaitem.01.32708.with.analyzedProspectionData.name=Analyzed Prospection Data
    S:gt.metaitem.01.32708.with.copyOfTheStick.name=Copy of the Stick
    S:gt.metaitem.01.32708.with.rawProspectionData.name=Raw Prospection Data
    S:gt.metaitem.01.32708.with.readsResearchResult.name=Reads Research result
    S:gt.metaitem.01.32708.with.scannedBookData.name=Scanned Book Data
    S:gt.metaitem.01.32708.with.scannedMapData.name=Scanned Map Data
    S:gt.metaitem.01.32708.with.stickToCopy.name=Stick to copy
    S:gt.metaitem.01.32708.with.stickToOverwrite.name=Stick to overwrite
    S:gt.metaitem.01.32708.with.stickToSaveItTo.name=Stick to save it to
    S:gt.metaitem.01.32708.with.withPunchCardData.name=With Punch Card Data
    S:gt.metaitem.01.32708.with.withScannedBookData.name=With Scanned Book Data
    S:gt.metaitem.01.32708.with.withScannedMapData.name=With Scanned Map Data
    S:gt.metaitem.01.32708.with.writesResearchResult.name=Writes Research result
    S:ic2.crop.invalid.with.DuplicatedSeedsChanceEqualsEfficiency.name=Duplicated seeds; Chance equals efficiency
    S:ic2.crop.invalid.with.InstanceSeedsToDuplicateDoesNotGetConsumedInProgress.name=Instance seeds to duplicate(does not get consumed in progress)
    S:ic2.crop.invalid.with.ScannedSeeds.name=Scanned Seeds
    S:ic2.crop.invalid.with.duplicatedSeedsChanceEqualsEfficiency.name=Duplicated seeds; Chance equals efficiency
    S:ic2.crop.invalid.with.instanceSeedsToDuplicateDoesNotGetConsumedInProgress.name=Instance seeds to duplicate(does not get consumed in progress)
    S:ic2.crop.invalid.with.scannedSeeds.name=Scanned Seeds
    S:item.for.beeDroneGE.with.ScannedDrone.name=Scanned Drone
    S:item.for.beeDroneGE.with.scannedDrone.name=Scanned Drone
    S:item.for.beeLarvaeGE.with.ScannedLarvae.name=Scanned Larvae
    S:item.for.beeLarvaeGE.with.scannedLarvae.name=Scanned Larvae
    S:item.for.beePrincessGE.with.ScannedPrincess.name=Scanned Princess
    S:item.for.beePrincessGE.with.scannedPrincess.name=Scanned Princess
    S:item.for.beeQueenGE.with.ScannedQueen.name=Scanned Queen
    S:item.for.beeQueenGE.with.scannedQueen.name=Scanned Queen
    S:item.for.butterflyGE.with.ScannedButterfly.name=Scanned Butterfly
    S:item.for.butterflyGE.with.scannedButterfly.name=Scanned Butterfly
    S:item.for.caterpillarGE.with.ScannedCaterpillar.name=Scanned Caterpillar
    S:item.for.caterpillarGE.with.scannedCaterpillar.name=Scanned Caterpillar
    S:item.for.pollenFertile.with.ScannedPollen.name=Scanned Pollen
    S:item.for.pollenFertile.with.scannedPollen.name=Scanned Pollen
    S:item.for.sapling.with.ScannedSapling.name=Scanned Sapling
    S:item.for.sapling.with.scannedSapling.name=Scanned Sapling
    S:item.for.serumGE.with.ScannedSerum.name=Scanned Serum
    S:item.for.serumGE.with.scannedSerum.name=Scanned Serum
lea@meumeu:~/ATL/instances/BRDEV$ egrep --extended-regexp '\.with\.[[:upper:]]' GregTech.lang 
    S:gt.metaitem.01.32707.with.CopyOfTheOrb.name=Copy of the Orb
    S:gt.metaitem.01.32707.with.OrbToCopy.name=Orb to copy
    S:gt.metaitem.01.32707.with.OrbToOverwrite.name=Orb to overwrite
    S:gt.metaitem.01.32708.with.AnalyzedProspectionData.name=Analyzed Prospection Data
    S:gt.metaitem.01.32708.with.CopyOfTheStick.name=Copy of the Stick
    S:gt.metaitem.01.32708.with.RawProspectionData.name=Raw Prospection Data
    S:gt.metaitem.01.32708.with.ReadsResearchResult.name=Reads Research result
    S:gt.metaitem.01.32708.with.ScannedBookData.name=Scanned Book Data
    S:gt.metaitem.01.32708.with.ScannedMapData.name=Scanned Map Data
    S:gt.metaitem.01.32708.with.StickToCopy.name=Stick to copy
    S:gt.metaitem.01.32708.with.StickToOverwrite.name=Stick to overwrite
    S:gt.metaitem.01.32708.with.StickToSaveItTo.name=Stick to save it to
    S:gt.metaitem.01.32708.with.WithPunchCardData.name=With Punch Card Data
    S:gt.metaitem.01.32708.with.WithScannedBookData.name=With Scanned Book Data
    S:gt.metaitem.01.32708.with.WithScannedMapData.name=With Scanned Map Data
    S:gt.metaitem.01.32708.with.WritesResearchResult.name=Writes Research result
    S:ic2.crop.invalid.with.DuplicatedSeedsChanceEqualsEfficiency.name=Duplicated seeds; Chance equals efficiency
    S:ic2.crop.invalid.with.InstanceSeedsToDuplicateDoesNotGetConsumedInProgress.name=Instance seeds to duplicate(does not get consumed in progress)
    S:ic2.crop.invalid.with.ScannedSeeds.name=Scanned Seeds
    S:item.for.beeDroneGE.with.ScannedDrone.name=Scanned Drone
    S:item.for.beeLarvaeGE.with.ScannedLarvae.name=Scanned Larvae
    S:item.for.beePrincessGE.with.ScannedPrincess.name=Scanned Princess
    S:item.for.beeQueenGE.with.ScannedQueen.name=Scanned Queen
    S:item.for.butterflyGE.with.ScannedButterfly.name=Scanned Butterfly
    S:item.for.caterpillarGE.with.ScannedCaterpillar.name=Scanned Caterpillar
    S:item.for.pollenFertile.with.ScannedPollen.name=Scanned Pollen
    S:item.for.sapling.with.ScannedSapling.name=Scanned Sapling
    S:item.for.serumGE.with.ScannedSerum.name=Scanned Serum
```
Copy link
Contributor

@bartimaeusnek bartimaeusnek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very clean and good to me.

better handling of Empty CamelCased DisplayName
Copy link
Collaborator

@draknyte1 draknyte1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What issue does this fix? From memory, the items listed have no issue on localisation.
I do not approve of this until I test & build it.

@leagris
Copy link
Contributor Author

leagris commented Dec 26, 2019

It fixes the issue that itemStacks created with a custom DisplayName, for the purpose of documenting recipes shown within NEI by calling the ItemList.withName(... method have no localisation keys to reflect the custom name, so are not localised and not localisable and show the English string provided to the withName call. This patch allow the registration of the custom DisplayName with a dedicated Key=value entry into Gregtech.lang that is generated on-demand at first call.

@draknyte1 draknyte1 self-assigned this Dec 26, 2019
@draknyte1 draknyte1 merged commit 2f813f7 into Blood-Asp:unstable Apr 6, 2020
leagris added a commit to GTNewHorizons/GT5-Unofficial that referenced this pull request Jan 24, 2021
Automatically generates entries into `Gregtech.lang` for items
with custom names (mostly used for recipes display in NEI).

Ported from: Blood-Asp/GT5-Unofficial#1552

Will provide new localization keys and default English texts.

Newly generated entries in `Gregtech.lang`:
```yaml
    S:gt.metaitem.01.32707.with.CopyOfTheOrb.name=Copy of the Orb
    S:gt.metaitem.01.32707.with.OrbToCopy.name=Orb to copy
    S:gt.metaitem.01.32707.with.OrbToOverwrite.name=Orb to overwrite
    S:gt.metaitem.01.32708.with.AnalyzedProspectionData.name=Analyzed Prospection Data
    S:gt.metaitem.01.32708.with.CopyOfTheStick.name=Copy of the Stick
    S:gt.metaitem.01.32708.with.RawProspectionData.name=Raw Prospection Data
    S:gt.metaitem.01.32708.with.ReadsResearchResult.name=Reads Research result
    S:gt.metaitem.01.32708.with.ScannedBookData.name=Scanned Book Data
    S:gt.metaitem.01.32708.with.ScannedMapData.name=Scanned Map Data
    S:gt.metaitem.01.32708.with.ScannedSchematic.name=Scanned Schematic
    S:gt.metaitem.01.32708.with.StickToCopy.name=Stick to copy
    S:gt.metaitem.01.32708.with.StickToOverwrite.name=Stick to overwrite
    S:gt.metaitem.01.32708.with.StickToSaveItTo.name=Stick to save it to
    S:gt.metaitem.01.32708.with.WithPunchCardData.name=With Punch Card Data
    S:gt.metaitem.01.32708.with.WithScannedBookData.name=With Scanned Book Data
    S:gt.metaitem.01.32708.with.WithScannedMapData.name=With Scanned Map Data
    S:gt.metaitem.01.32708.with.WritesResearchResult.name=Writes Research result
    S:ic2.crop.invalid.with.ScannedSeeds.name=Scanned Seeds
    S:item.for.beeDroneGE.with.ScannedDrone.name=Scanned Drone
    S:item.for.beeLarvaeGE.with.ScannedLarvae.name=Scanned Larvae
    S:item.for.beePrincessGE.with.ScannedPrincess.name=Scanned Princess
    S:item.for.beeQueenGE.with.ScannedQueen.name=Scanned Queen
    S:item.for.butterflyGE.with.ScannedButterfly.name=Scanned Butterfly
    S:item.for.caterpillarGE.with.ScannedCaterpillar.name=Scanned Caterpillar
    S:item.for.pollenFertile.with.ScannedPollen.name=Scanned Pollen
    S:item.for.sapling.with.ScannedSapling.name=Scanned Sapling
    S:item.for.serumGE.with.ScannedSerum.name=Scanned Serum
```
leagris added a commit to GTNewHorizons/GT5-Unofficial that referenced this pull request Jan 25, 2021
Automatically generates entries into `Gregtech.lang` for items
with custom names (mostly used for recipes display in NEI).

Ported from: Blood-Asp/GT5-Unofficial#1552

Will provide new localization keys and default English texts.

Newly generated entries in `Gregtech.lang`:
```yaml
    S:gt.metaitem.01.32707.with.CopyOfTheOrb.name=Copy of the Orb
    S:gt.metaitem.01.32707.with.OrbToCopy.name=Orb to copy
    S:gt.metaitem.01.32707.with.OrbToOverwrite.name=Orb to overwrite
    S:gt.metaitem.01.32708.with.AnalyzedProspectionData.name=Analyzed Prospection Data
    S:gt.metaitem.01.32708.with.CopyOfTheStick.name=Copy of the Stick
    S:gt.metaitem.01.32708.with.RawProspectionData.name=Raw Prospection Data
    S:gt.metaitem.01.32708.with.ReadsResearchResult.name=Reads Research result
    S:gt.metaitem.01.32708.with.ScannedBookData.name=Scanned Book Data
    S:gt.metaitem.01.32708.with.ScannedMapData.name=Scanned Map Data
    S:gt.metaitem.01.32708.with.ScannedSchematic.name=Scanned Schematic
    S:gt.metaitem.01.32708.with.StickToCopy.name=Stick to copy
    S:gt.metaitem.01.32708.with.StickToOverwrite.name=Stick to overwrite
    S:gt.metaitem.01.32708.with.StickToSaveItTo.name=Stick to save it to
    S:gt.metaitem.01.32708.with.WithPunchCardData.name=With Punch Card Data
    S:gt.metaitem.01.32708.with.WithScannedBookData.name=With Scanned Book Data
    S:gt.metaitem.01.32708.with.WithScannedMapData.name=With Scanned Map Data
    S:gt.metaitem.01.32708.with.WritesResearchResult.name=Writes Research result
    S:ic2.crop.invalid.with.ScannedSeeds.name=Scanned Seeds
    S:item.for.beeDroneGE.with.ScannedDrone.name=Scanned Drone
    S:item.for.beeLarvaeGE.with.ScannedLarvae.name=Scanned Larvae
    S:item.for.beePrincessGE.with.ScannedPrincess.name=Scanned Princess
    S:item.for.beeQueenGE.with.ScannedQueen.name=Scanned Queen
    S:item.for.butterflyGE.with.ScannedButterfly.name=Scanned Butterfly
    S:item.for.caterpillarGE.with.ScannedCaterpillar.name=Scanned Caterpillar
    S:item.for.pollenFertile.with.ScannedPollen.name=Scanned Pollen
    S:item.for.sapling.with.ScannedSapling.name=Scanned Sapling
    S:item.for.serumGE.with.ScannedSerum.name=Scanned Serum
```
mitchej123 pushed a commit to GTNewHorizons/GT5-Unofficial that referenced this pull request Jan 25, 2021
Automatically generates entries into `Gregtech.lang` for items
with custom names (mostly used for recipes display in NEI).

Ported from: Blood-Asp/GT5-Unofficial#1552

Will provide new localization keys and default English texts.

Newly generated entries in `Gregtech.lang`:
```yaml
    S:gt.metaitem.01.32707.with.CopyOfTheOrb.name=Copy of the Orb
    S:gt.metaitem.01.32707.with.OrbToCopy.name=Orb to copy
    S:gt.metaitem.01.32707.with.OrbToOverwrite.name=Orb to overwrite
    S:gt.metaitem.01.32708.with.AnalyzedProspectionData.name=Analyzed Prospection Data
    S:gt.metaitem.01.32708.with.CopyOfTheStick.name=Copy of the Stick
    S:gt.metaitem.01.32708.with.RawProspectionData.name=Raw Prospection Data
    S:gt.metaitem.01.32708.with.ReadsResearchResult.name=Reads Research result
    S:gt.metaitem.01.32708.with.ScannedBookData.name=Scanned Book Data
    S:gt.metaitem.01.32708.with.ScannedMapData.name=Scanned Map Data
    S:gt.metaitem.01.32708.with.ScannedSchematic.name=Scanned Schematic
    S:gt.metaitem.01.32708.with.StickToCopy.name=Stick to copy
    S:gt.metaitem.01.32708.with.StickToOverwrite.name=Stick to overwrite
    S:gt.metaitem.01.32708.with.StickToSaveItTo.name=Stick to save it to
    S:gt.metaitem.01.32708.with.WithPunchCardData.name=With Punch Card Data
    S:gt.metaitem.01.32708.with.WithScannedBookData.name=With Scanned Book Data
    S:gt.metaitem.01.32708.with.WithScannedMapData.name=With Scanned Map Data
    S:gt.metaitem.01.32708.with.WritesResearchResult.name=Writes Research result
    S:ic2.crop.invalid.with.ScannedSeeds.name=Scanned Seeds
    S:item.for.beeDroneGE.with.ScannedDrone.name=Scanned Drone
    S:item.for.beeLarvaeGE.with.ScannedLarvae.name=Scanned Larvae
    S:item.for.beePrincessGE.with.ScannedPrincess.name=Scanned Princess
    S:item.for.beeQueenGE.with.ScannedQueen.name=Scanned Queen
    S:item.for.butterflyGE.with.ScannedButterfly.name=Scanned Butterfly
    S:item.for.caterpillarGE.with.ScannedCaterpillar.name=Scanned Caterpillar
    S:item.for.pollenFertile.with.ScannedPollen.name=Scanned Pollen
    S:item.for.sapling.with.ScannedSapling.name=Scanned Sapling
    S:item.for.serumGE.with.ScannedSerum.name=Scanned Serum
```
aagrishankov added a commit to GT-IMPACT/GT5.09OFFBEAT that referenced this pull request Jan 24, 2022
Automatically generates entries into `Gregtech.lang` for items
with custom names (mostly used for recipes display in NEI).

Ported from: Blood-Asp/GT5-Unofficial#1552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants