phetsims / decaf

PhET Java Simulations converted to HTML5 using CheerpJ
1 stars 0 forks source link

End Support for Java and Cheerpj Translations Deployment Process #132

Open mattpen opened 2 years ago

mattpen commented 2 years ago

Last week @KatieWoe deployed some translations for Java sims (capacitor-lab, faraday in az). These were deployed successfully. She noticed that the cheerpj version did not have the translation. We checked with @samreid in slack who pointed out that cheerpj has a separate translation publication process: https://github.com/phetsims/decaf/blob/73d64f7c556444e1552d2d5c9267b6c99d897b3c/README.md. It's not clear who is responsible for executing this process.

Should we add the cheerpj instructions as checklist items to the existing documentation for deploying java translations, or should we try to automate this with tooling?

KatieWoe commented 2 years ago

I'm ok with either. I will say that I've never done the cheerpj process, so if it is being incorporated manually I would need some training on it.

samreid commented 2 years ago

If I recall correctly, @chrisklus and I are the only team members that have deployed CheerpJ simulations. There was a proposal to automated and streamline the process and make it easier for other team members to contribute, but it was decided against. Last time we deployed translations, we batched up several so we could deploy them all at once. Is there a way to check all the new Java translations since the last CheerpJ deployment, so we can catch them all?

mattpen commented 2 years ago

It looks like there was a problem with the latest batch, which would be good to fix before we proceed with publishing the next batch of cheerpj translations: https://github.com/phetsims/website/issues/1344. I hope to get this fixed this week.

There was a change to the website that makes the untranslated Cheerpj sims much more visible since the last batch (Dec '21 I believe). If it's feasible the cheerpj updates should probably be done very soon after the java translations, rather than saving up a large batch. See the translations table for MAE for example:

image

Is there a way to check all the new Java translations since the last CheerpJ deployment, so we can catch them all?

I think we could do this with a query of the Metadata API (v1.3). I need to check a few things then I can post a solution here.

mattpen commented 2 years ago

Here's a js snippet that will create a list of simulations and locales that are missing cheerpj translations.

const axios = require( 'axios' );

( async () => {
    // Fetch the data from the server
    const metadata = ( await axios.get( 'https://phet.colorado.edu/services/metadata/1.3/simulations?format=json&&type=java&summary' ) ).data;

    // Discard any non-cheerpj sims
    const cheerpjSimulations = metadata.projects.reduce( 
        ( acc, project ) => acc.concat( project.simulations.filter( s => s.cheerpjVersion ),
        [] 
    );

    // Discard any translations that were already published as cheerpj
    const untranslatedLocalizedSimulations = cheerpjSimulations.reduce( ( acc, simulation ) => {
        const missingLocales = [];
        for ( let locale in simulation.localizedSimulations ){
            if ( !simulation.localizedSimulations[ locale ].isCheerpj ) {
                missingLocales.push( locale );
            }
        }
        if ( missingLocales.length > 0 ) {
            acc.push( { name: simulation.name, missingLocales: missingLocales } );
        }
        return acc;
    }, [] );

    console.log( JSON.stringify( untranslatedLocalizedSimulations, null, "  " ) );
} )();
oliver-phet commented 1 year ago

@KatieWoe Can you give me a count of the number pending Java sims? It looks like we might be able to capture 7 new sims in CheerpJ variants.

Once we have that number we can decide how to proceed - likely just abandoning legacy translation deploys (and updating the For Translators page)

KatieWoe commented 1 year ago

There's one translation that I tried to upload that failed. And an unknown number from a colleague of Diana's.

oliver-phet commented 1 year ago

@kathy-phet see above - up to you to decide if you'd like to revisit the legacy publication process.

kathy-phet commented 1 year ago

@mattpen - Can you run the script in comment - https://github.com/phetsims/decaf/issues/132#issuecomment-1068189764 - and document the translations that are not in CheerpJ?

kathy-phet commented 1 year ago

@DianaTavares - Can you elaborate on this comment https://github.com/phetsims/decaf/issues/132#issuecomment-1377805484? How many Java translations do you know about that are not deployed?

kathy-phet commented 1 year ago

I asked PhET-Global:

I wanted to check in with you, since you are closest to the users who would be impacted. Please comment - either as to whether you agree with or not this deprioritization of this service. (Maintaining it takes resources, that could otherwise work on other priorities like HTML conversions.)

RV says - I agree with this deprioritization. @solaolateju and I agreed early on that we would not provide any support on training for Java. (It was always there on the website, but no one has asked for it, and I would say we actively discourage it anyway, as legacy sims are not maintained).

Sola - Also agreed with deprioritization.