"We were working all the night"
I agree that your sentences sound more natural, and I'd say that "all the night" is a rarer and more British expression.
But my suggestion is wrong anyway because it would translate to the 'passato prossimo' (abbiamo lavorato), but it would not translate to the 'trapassato prossimo' (avevamo lavorato).
I don't think that my suggestion can be 'imperfetto' either as it has an fixed time constraint (all night). Without the constraint I would translate it as 'imperfetto'.
The imperfetto would be OK if you were referring to a busy time at work where you were habitually working all night i.e. you are referring to repeated occasions rather than one when you say that "we were working all night". Then I think that imperfetto would be the correct tense.
It wouldn't work in this case, because that would be "Abbiamo lavorato..." This is "Avevamo lavorato..." and so it is a different tense. The first would be translated, "We have worked..." or simply, "We worked..." The second would be "We had worked..." or even perhaps (but this would have to be verified), "We had been working..." All the best.
yeah, but in English the tense doesn't change with "we worked all night" and "We had worked all night" the context of the conversation would perform that function. So for the purpose of translation "we worked all night" should be accepted and acceptable. In ogni caso I still don't understand the difference between the phrases "Abbiamo lavorato tutto la notte" and "Avevamo lavorato tutto la notte" they seem like they're delivering the same message if you could elaborate just a bit more on the differences I'd be pretty greatful
1) if the auxiliary verb is "avere" the participle follows number and gender of direct object, not of subject.
2)they both are usually correct forms: with agreement and without. The agreement (expecially of numbers) is more common if the direct object is expressed with a pronoun, more rarely without it.
we had worked the plastic = "avevamo lavorata la plastica" (it isn't grammatically wrong, but not very used!) / "avevamo lavorato la plastica" (good one!);
we had waited her = "la avevamo aspettato" ( :/ not wrong, but bad and misunderstandable) / "l'avevamo aspettata" (good one!);
we had waited them = "li avevamo aspettati" / "le avevamo aspettate" (the only right answer! this is an exception of the rule: if the direct object is expressed with the pronoun "them", participle must agree in gender and number).
No. That implies a past obligation or compulsion (abbiamo dovuto lavorare) rather than the trapassato prossimo tense where the "had" is just the auxiliary verb that has nothing to do with "had to". The trapassato prossimo (pluperfect in English) is used to describe a past event that happened before another past event. In this sentence the other past event is not stated but it would be stated in the previous or next sentence. e.g "We had worked all night. Therefore we were very tired the next day"
and rightly so. the correct translation is "we had worked all night". this tense is used when you speak of something that had been completed before another completed occurrence. "we had worked all night before they decided to go in another direction." duo doesn't give the context but it doesn't change the translation. there are lots of postings on the web explaining the way tenses are used. here is one. https://www.thoughtco.com/italian-past-perfect-tense-2011707 and another http://icebergproject.co/italian/2014/10/how-to-use-the-trapassato-prossimo-in-italian-or-how-to-talk-about-things-that-happened-in-the-past/